I have this VB .NET code. It is for a login:
If myData.HasRows = 0 Then
MsgBox("Invalid License/Password!")
Else
MainForm.Show()
Me.Hide()
End If
The problem is the hide. Because when I close the program with the MainForm exit windows button, don´t close.
If I put it Me.Close() close all the program.
Go to Project properties and under Application tab set the Shutdown Mode to When Last Form Closes and you can use the
Me.Close()with no problem