bhushan1980
December 25th, 2009, 11:36 AM
Hi all,
I am developing a winforms application. There is a login functionality requirement. So I have created a multi-tabbed login dialog, which has login, register, forgot password, etc tabs. I have included 2 buttons on the dialog outside of the tab control, to perform the dialog result accept and reject functionality. On accept dialog however, want to open up the applications main form. So I am having the following problems:
- First and the most important issue is the simplest thing a .NET guy could do...as I said pop up another dialog / form from a button click event on another dialog / form. In our case, I wrote the following code:
// The following is the part of code where a successful login brings up the main form....
public void btnAccept_Click(System.Object sender, System.EventArgs e)
{
// ...if user is valid user
MainFrm mfrm = new MainFrm();
mfrm.Show();
// However, a new form shows up, but is blank, wthiout any control and closes instantly
// I also tried declaring a class level instance of MainFrm, but no difference
}
Coming from VC++ background and even after knowing .NET well, I am not able to figure out this. Also, I want to transfer the applications control to the Mainform and close the login dialog as its use is over...This is the urgent part...can anyone help?
- I have never created a windows application which is secured and requires a user to login. Is there a good example on web that would allow me look into more standard way to deal with this kind of application as in the case of plentiful examples on web for ASP.NET applications?
- I just want to encrypt the user name and password and store them in a text file and then retrieve them after decrypting them for matching them to the user entered details. Is there an example shows how to encrypt the login info and stores it in text file?
Thanks,
Bhushan
I am developing a winforms application. There is a login functionality requirement. So I have created a multi-tabbed login dialog, which has login, register, forgot password, etc tabs. I have included 2 buttons on the dialog outside of the tab control, to perform the dialog result accept and reject functionality. On accept dialog however, want to open up the applications main form. So I am having the following problems:
- First and the most important issue is the simplest thing a .NET guy could do...as I said pop up another dialog / form from a button click event on another dialog / form. In our case, I wrote the following code:
// The following is the part of code where a successful login brings up the main form....
public void btnAccept_Click(System.Object sender, System.EventArgs e)
{
// ...if user is valid user
MainFrm mfrm = new MainFrm();
mfrm.Show();
// However, a new form shows up, but is blank, wthiout any control and closes instantly
// I also tried declaring a class level instance of MainFrm, but no difference
}
Coming from VC++ background and even after knowing .NET well, I am not able to figure out this. Also, I want to transfer the applications control to the Mainform and close the login dialog as its use is over...This is the urgent part...can anyone help?
- I have never created a windows application which is secured and requires a user to login. Is there a good example on web that would allow me look into more standard way to deal with this kind of application as in the case of plentiful examples on web for ASP.NET applications?
- I just want to encrypt the user name and password and store them in a text file and then retrieve them after decrypting them for matching them to the user entered details. Is there an example shows how to encrypt the login info and stores it in text file?
Thanks,
Bhushan