Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'Form1 coding:
- Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked
- MsgBox("Your Password Hint is: " + My.Settings.PasswordHint)
- 'displays a messagebox with your password hint
- End Sub
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- If TextBox1.Text = My.Settings.Username And
- TextBox2.Text = My.Settings.Password Then
- MsgBox("Logged In") 'if the first textbox's text is the username and the second textbox's text is the password then display a messagebox that says you're logged in.
- Else
- MsgBox("Incorrect Username or Password") 'if the username and password are incorrect then show a messagebox that says your username or password is incorrect.
- End If
- End Sub
- Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
- Form2.Show() 'shows the Create Account form so that the user can create an account.
- End Sub
- 'Form 2 Coding:
- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
- TextBox1.Text = My.Settings.Username 'makes the first textbox's text the username
- TextBox2.Text = My.Settings.Password 'makes the second textbox's text the password
- TextBox3.Text = My.Settings.PasswordHint 'makes the third textbox's text the password hint
- My.Settings.Save()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement