I want it to be advanced like say if you pressed remember me on login then the next login it will log you in automatically.

1.You can store login info into a secret file (Content must be Encrypted).
2. Now when application run first check if the file exist
3. If exist read the content(Decrypt it and read)
4. If the Credential is authentic then Login

you need database with user and password saved.

1. Go to your project properties and click on settings tab on the left. and create a setting called UserI.
2. Create a form with 2 textboxes and name them txtUserID and txtPassword, and create a checkbox and name it chkSaveUser. A button with name btnLogin

Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
        txtPassword.PasswordChar = "*"
        If My.Settings.UserID <> Nothing Then
            chkSaveUser.Checked = True
            txtUserID.Text = My.Settings.UserID
        End If
    End Sub

    Private Sub btnLogin_Click(sender As System.Object, e As System.EventArgs) Handles btnLogin.Click
        'you need to decide how you want to look up the password for the matching user id
        Dim pass As String = "your password that matches your username"

        If txtPassword.Text = pass Then
            MsgBox("tada")
        Else
            MsgBox("Invalid password")
            Exit Sub
        End If

        If chkSaveUser.Checked = True Then
            My.Settings.UserID = txtUserID.Text
        Else
            My.Settings.UserID = Nothing
        End If
    End Sub

bluehangook629

It is limited for only one user. I think he wants multiple user to handled.

For example the gmail login form you can click remember me option. But after you logoff other also can use remember me option. Am i wrong??

Well guys I made this to make a file that can open only with notepad and the file will be Encrypted here the code.

Dim UserFile As String = "C:\Users\PC\Documents\Frenemy2\Userdata\username.user"
        IO.File.WriteAllText(UserFile, TextBox2.Text)

        Dim PassFile As String = "C:\Users\PC\Documents\Frenemy2\Userdata\password.pass"
        IO.File.WriteAllText(PassFile, TextBox3.Text)

sorry dude, I not a big fan of txt files and notepads so never worked with them. But if you want to use a sql db then take a look at my post, I think i have everything that you need.

And reading that article is hard to understand because i dont know what to change to match my settings with no errors.

I have gtalk installed my id is [snipped] you can contact me. So i can guide you. Too much delay in posting.

Edited 5 Years Ago by Ezzaral: Snipped email. Please keep it on site.

SQL is a database.
Wiki or Google it. you'll be better off.


*p.s. didnt know there are multiple pages to this post... sorry

Edited 5 Years Ago by bluehangook629: n/a

This question has already been answered. Start a new discussion instead.