Hi all,
I've a problem with a login form that doesn't close. I want it closes
after successful login, calling another form (the application main
form).
I tried with Dispose() and close(), and this way it closes the called
form, too. Without such methods, the login form stays in background,
and once I close the main form,
login form is still on the screen, and doesn't close.
So I added a main module, as follows:
Public Module main
Sub main()
Dim formLogin As New LoginForm
If (formLogin.ShowDialog() = DialogResult.OK) Then
'formLogin.Close() or formLogin.Dispose here
' closes both forms.
Application.Run(New MainForm)
End If
End Sub
End Module
Code into formLogin to call formMain is:
....
Dim formMain As New MainForm
formMain.Owner = Me
formMain.Show()
Me.Enabled = False
....
Thanks for help
N! Xau