I'm using VB.net BTW!
Below is the code for my login page.
Expand|Select|Wrap|Line Numbers
- Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
- If UsernameTextBox.Text = "admin" And PasswordTextBox.Text = "admin" Then
- Form1.Show()
- Else
- MsgBox("Incorrect password", vbExclamation, "Header")
- UsernameTextBox.Text = ""
- PasswordTextBox.Text = ""
- End If
- End Sub