Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
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 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)
'displats a messagebox with your password hint
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
End Class
Me.Hide() Form3.show()
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If TextBox1.Text = My.Settings.Username & TextBox2.Text = My.Settings.Password Then
MsgBox("Logged In")
Me.Hide()
Form3.Show()
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