[Help]problem with code[/solved]
ok well i made a login for my mini tool thing where u got to login to use it . an then it opens form1 if info is right but it closes everything after it logins in y?
Code:
Private Sub OK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles OK.Click
If OK.Enabled = True Then Timer1.Enabled = True
If Login(UsernameTextBox.Text, PasswordTextBox.Text) Then
MsgBox("Login Succesfull", MsgBoxStyle.OkOnly, "Logged in")
Form1.Show()
Me.Close()
Else
If MsgBox("Login failed, please register at Mpgh.net to use this program" & vbCrLf & "Want to try again?", MsgBoxStyle.RetryCancel, "Warning") = MsgBoxResult.Retry Then
Else
End If
End If
End Sub
Project properties > Application > Shutdown modus(or whatever it is called) > When last form closes.