Windows Form login question

J

Jason Huang

Hi,

In my C# Windows Form project, saying in form frmLogin I have two TextBoxes,
UserName, Password.
How do I make the frmLogin remember the current UserName,
so next time I login to the frmLogin, the UserName textbox has the last time
login UserName value?
given that the application is running on Windows XP system.
Thanks for help.


Jason
 
F

family.sens

you could store the value in the registry maybe.

msdn.microsoft.com/library/en-us/dndotnet/html/persistappsettnet.asp

are you having seperate userids for your program ?

or using the Currently Logged In User ?
 
J

Jason Huang

Thanks!
If the User is the first time enter into the application, the user has to
key in the UserName and Password to login.
After that, the UserName textbox in frmLogin will bring out the last
UserName value logged in.
 
O

Otis Mukinfus

Thanks!
If the User is the first time enter into the application, the user has to
key in the UserName and Password to login.
After that, the UserName textbox in frmLogin will bring out the last
UserName value logged in.
Is this application on the users's machine or a server?

Storing the last user will work if the app is on a user machine, but
if it's on a server being accessed by multiple users you'll always get
the last user who logged in, but it may not be the current user.

Does that make sense?

Otis Mukinfus
http://www.otismukinfus.com
http://www.tomchilders.com
 
M

Mel

Download the example TaskVision from Microsoft, includes source code. It
has a login form that does exactly what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top