|
hi all,
i ve my desktop application in c# with its setup project.
i ve windows xp and want to change its BOOT SCREEN and WELCOME SCREEN
using my c# code.
(i want to change it when setup is run, and when application is uninstalled normal mode
should be activated)
is there any way to achieve this without using any third party tool?
it should not affect other settings done by user.
Thanks.
Regards
-SIFAR
|
|
|
|
|
The following are some third party tools that allow you to change the login and boot screens. The tools manufacturer had to work with Microsoft to develop these tools, and for the average consumer, I would say that they cannot be altered. I will give a few reasons why this is, and why what you are asking is slightly out of reach.
First, C# will be unable to change the boot screen and possibly the welcome screen because it is bound by the .NET framework which isn't loaded that early in the system. I believe it can, at most, alter aspects (not the whole) of the logon screen. Second, these features you are asking cannot be for individual profiles because they take affect before the system begins to boot and before any user is able to login.
If you are still interested in toggling a few aspects of the OS, you can look in ResHack. It is a tool that does allow some customization of dll files and may help with manipulating various aspects of the boot/login/welcome screens.
http://www.stardock.com/products/bootskin/[^]
http://www.stardock.com/products/logonstudio/[^]
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Thanx,
for now, i got the solution by disabling the boot GUI.
(i still want to change it)
i achieve this by adding /noguiboot in boot.ini
And for login screen i made autologin with Winlogon registry.
As for now, it works fine for me.
But still i want to put some images instead of NO GUI AT ALL.
Regards,
-SIFAR.
|
|
|
|
|
HI ALL,
I am using the following code for Decrtption
public static string Decrypt(string xxxxx)
{
RijndaelManaged RijndaelCipher = new RijndaelManaged();
string Password = "srinu";
byte[] EncryptedData = Convert.FromBase64String(xxxxx);
byte[] Salt = Encoding.ASCII.GetBytes(Password.Length.ToString());
//Making of the key for decryption
PasswordDeriveBytes SecretKey = new PasswordDeriveBytes(Password, Salt);
//Creates a symmetric Rijndael decryptor object.
ICryptoTransform Decryptor = RijndaelCipher.CreateDecryptor(SecretKey.GetBytes(32), SecretKey.GetBytes(16));
MemoryStream memoryStream = new MemoryStream(EncryptedData);
//Defines the cryptographics stream for decryption.THe stream contains decrpted data
CryptoStream cryptoStream = new CryptoStream(memoryStream, Decryptor, CryptoStreamMode.Read);
byte[] PlainText = new byte[EncryptedData.Length];
int DecryptedCount = cryptoStream.Read(PlainText, 0, PlainText.Length);
memoryStream.Close();
cryptoStream.Close();
//Converting to string
string DecryptedData = Encoding.Unicode.GetString(PlainText, 0, DecryptedCount);
return DecryptedData;
}
It is showing me an error
"An exception of type 'System.FormatException' occurred in .DLL but was not handled in user code
Additional information: Invalid length for a Base-64 char array."
in the Line "byte[] EncryptedData = Convert.FromBase64String(xxxxx);"
Plz help me solve this ASAP.
|
|
|
|
|
srinivaskonijeti wrote: Additional information: Invalid length for a Base-64 char array."
in the Line "byte[] EncryptedData = Convert.FromBase64String(xxxxx);"
It should be clear, the xxxxx string you pass in, is NOT BASE64 encoded.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
I am running Visual Studio 2008.
Right clicking on the references in Solution Explorer shows Add reference and Add Service reference.
There is no Add Web Reference.
So using the Add Service reference, I added a reference to a web service.
Now I do not get the name of the web method in the web service.
For example, I type the name of the reference to the web service which is
wsTransactionService and place a dot after it, but I do not get the name of the web method instead I get the name of the webmethod and Soap attached to the end of the method name.
What am I doing wrong please?
Thanks
|
|
|
|
|
You have to create an instance of your web service class to use the methods.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
It does not allow me to create an instance because I can not find the method name
i.e.
I can not do the fooowing because TransactionService comes up with Soap attached to it
wsTransactionService.TransactionService ws = new wsTransactionService.TransactionService();
|
|
|
|
|
I don't have my computer up and running at the moment, so I can't check, but there shouldn't be many classes to choose from.
If I remember correctly you should create a wsTransactionService.Service object.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
I do not see the webmethod.
How can I get the web reference added to my project because I only see add service reference.
Thanks
|
|
|
|
|
You will see a class named like ServiceClientSoap . Initialize that one and you will see your WS methods are listed.
|
|
|
|
|
This is what I have now as you suggested:
wsTransactionService.TransactionServiceSoap ws = new wsTransactionService.TransactionServiceSoap();
but ws. does not show me credentials
|
|
|
|
|
Hi
Is it possible to change size of controls of form while maximize or minimize form??
Hitesh sojitra
|
|
|
|
|
Yes it is. I docking and anchoring does not suit your needs you can subscribe to resize event of the form, check forms WindowState property and resize controls according to your needs.
|
|
|
|
|
private void button1_Click(object sender, EventArgs e)
{
Rectangle cropArea = new Rectangle(20, 20, 10, 10);
Pic = cropImage(bmpPicture,cropArea);
bmpPicture = Pic;
}
public Image cropImage(Image img, Rectangle cropArea)
{
Bitmap bmpImage = new Bitmap(img);
Bitmap bmpCrop = bmpImage.Clone(cropArea,
bmpImage.PixelFormat);
return (Image)(bmpCrop);
}
i am trying this but here is some error generated.
error is :
Error 1 Cannot implicitly convert type 'System.Drawing.Image' to 'System.Drawing.Bitmap'. An explicit conversion exists (are you missing a cast?) D:\dot.net.programs.using.c#\temp\scallingImage\scallingImage\Form1.cs 89 23 scallingImage
hghghgh
|
|
|
|
|
1. Use pre tags for posting code.
2. You are assigning Image variable to an instance of Bitmap class. Either return Bitmap from cropImage function or cast the result to Image.
|
|
|
|
|
I think Giorgi meant to state "cast the result to Bitmap"
The error message explains the problem and a solution. It can be helpful
to us if you point out the line the error occurs on as well.
maifs wrote: return (Image)(bmpCrop);
This cast isn't necessary. Bitmap is derived from Image so the
bmpCrop object is already an Image.
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
How can I discard Dialog "Page x of document" shown after printing each page of a multi page document?
The tiltle bar of the Dialog is "Printing" and is shown after printing each page of document.
|
|
|
|
|
Hi,
I have created my application using asp:login control. I need to make the login control to remember only the username on next login.
Any luck? - Rams.
Be simple and Be sample.
|
|
|
|
|
Hi Rams,
Refer to the following code that uses a CheckBox and gives the flexibility to the user to save the username:
<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
{<br />
if (!Page.IsPostBack)<br />
{<br />
CheckBox cek = (CheckBox)Login1.FindControl("RememberMe");<br />
if (Request.Cookies["username"] == null Request.Cookies["username"].Value.ToString().Trim() == "")<br />
{<br />
cek.Checked = false;<br />
}<br />
else<br />
{<br />
<br />
Login1.UserName = Request.Cookies["username"].Value.ToString();<br />
}<br />
}<br />
}<br />
<br />
<br />
protected void Login1_LoggingIn(object sender, LoginCancelEventArgs e)<br />
{<br />
CheckBox cek = (CheckBox)Login1.FindControl("RememberMe");<br />
if (cek.Checked == true)<br />
{<br />
HttpCookie cookie = new HttpCookie("username");<br />
cookie.Value = Login1.UserName;<br />
<br />
cookie.Expires = DateTime.Now.AddDays(1);
HttpContext.Current.Response.AppendCookie(cookie);<br />
}<br />
else {<br />
HttpContext.Current.Response.Cookies.Remove("username");<br />
}<br />
cek.Checked = false;<br />
}<br />
<br />
//--- another way
<br />
<br />
protected void Page_Load(object sender, EventArgs e)<br />
<br />
{<br />
<br />
if (Request.Cookies["MyCookie"] != null)<br />
<br />
{<br />
<br />
TextBox pass = (TextBox)Login1.FindControl("Password"); pass.Attributes.Add("value", Request.Cookies["MyCookie"]["password"]); Login1.UserName = Request.Cookies["MyCookie"]["username"];<br />
<br />
}<br />
<br />
}<br />
<br />
protected void Login1_LoggedIn(object sender, EventArgs e)<br />
<br />
{ <br />
<br />
HttpCookie cookie1 = new HttpCookie("MyCookie"); <br />
<br />
cookie1.Values.Add("username", Login1.UserName);<br />
<br />
cookie1.Values.Add("password", Login1.Password); <br />
<br />
cookie1.Expires = DateTime.Now.AddDays(1);
<br />
}<br />
<br />
I hope this would be helpful. For more information on this refer to the following links:
Overview of Forms Authentication[^]
How to implement simple Form Authentication[^]
John Adams
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
This is good, But I am validating login thru membership provider.
My problem is, it will login automatically without asking the user name and password when I choose "RememberMe" option checked.
I need login control needs to remember only username using "RememberMe" option and password alwasy user needs to enter.
Any luck? - Rams.
Be simple and Be sample.
|
|
|
|
|
Add a non-expiring cookie. For more info, go to the ASP.NET forum.
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
Hi,
If I built a windows application in VS2008, the class name I got is something like WindowsForms10.Window.8.app.0.378734a
Is it possible to change this class name? I tried to do
protected override System.Windows.Forms.CreateParams CreateParams
{
[SecurityPermission(SecurityAction.LinkDemand, Flags = SecurityPermissionFlag.UnmanagedCode)]
get
{
System.Windows.Forms.CreateParams cp = base.CreateParams;
cp.ClassName = "MyTestApp.MainForm";
return cp;
}
}
But every time I run my application, I got this error
Attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang.
Any idea?
Cheers
|
|
|
|
|
RYU^^ wrote: Any idea?
Why on earth would you want to do such a thing?
xacc.ide - now with TabsToSpaces support IronScheme - 1.0 alpha 4a out now (29 May 2008) ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))
|
|
|
|
|
leppie wrote: Why on earth would you want to do such a thing?
Do you mean changing the class name from WindowsForms10.Window.8.app.0.378734a to MyTestApp.MainForm? Well, I need to do that so that I can use FindWindow().
The reason I need to use FindWindow() is because that is the only function I can find in NSIS (NULLSoft) to find out whether specific application is running or not.
Cheers
|
|
|
|