here is the code i am using:
after correct info is entered it doesnt load form1. any help? thankyouCode:Public Class LoginForm1 Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click If Me.UsernameTextBox.Text = "" And Me.PasswordTextBox.Text = "" Then Dim form As New Form Form1.Show() Me.Hide() Else MsgBox("Could not verify your identity. Invalid username or password.") PasswordTextBox.Text = "" UsernameTextBox.Text = "" UsernameTextBox.Select() End If Me.Close() End Sub Private Sub Cancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Cancel.Click Me.Close() End Sub Private Sub LoginForm1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load End Sub Private Sub UsernameLabel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UsernameLabel.Click End Sub




Reply With Quote