I have a login form with username and password authentication . It works fine. But I want to give option to remember login info option in the form. Please help me with the code.


At the top of you code page -

Dim strUser As String, strPass As String

In the login click event, add the variables to the string. This will be then be saved throughout the forms life

strUser = Username 'Whatever you have in your text box

Thanx for the reply but my login form get disposed after successful login and I want if user open the form next time they should get like in webform.


Then just declare the strings public-ally (globally) and call it from there.

Sorry I think I did not put my prob clearly. I want option for user to if they want to remember username password if he clicks yes then next time when he open application login info gets populated like in web application. Is it possible in windows application


Ah, different scenario.:)

Add an extra field to your login database table. If the user selects "Yes, remember me", add a value to the field, say for instance "Yes" etc.

When the login page loads, check if the Value in the field is yes or no. If yes, add the username and password. If no, user will have to add data.

wow..its realy unsecured. that mean anybody can access a program.
say, if andre has already registered as user then every you open the program, he directly enter without login. so, what about another user open this program?
another user can directly access program too..

i suggest to load a user name and display it when user type a user name, but not the password.

You can use a database to save/retrieve the information or you can use the settings option of your project to save the information as well and then retrieve it when the form loads again, or you reopen the whole app.