Closing a form when a new one opens.

  • Thread starter Thread starter Joshua Kendall
  • Start date Start date
J

Joshua Kendall

I have a login open a form. Now how do I close the login
when the other form opens?

Thanks for the help.

Joshua Kendall.
 
Joshua Kendall said:
I have a login open a form. Now how do I close the login
when the other form opens?

Depends on the application structure. Example:

shared sub main
dim f1 as loginform
dim f2 as mainform
f1=new loginform
if f1.showdialog=dialogresult.ok then
f2 = new mainform
application.run(f2)
end if
end sub
 
I have a splash screen/login that shows first, upon
validating the password the form opens another form, but
the splash screen/login won't go away when the main app.
is loaded.

heres my code:

Private Sub LoginBTN_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
LoginBTN.Click
If PassINP.Text = "bluecats" And UserINP.Text
= "Joshua" Then Dim frmMainApp As New frmMainApp() :
frmMainApp.Show() Else End
End Sub
 
Back
Top