hello i am making a password protected program and i need to switch between 2 different forms. 1 is the login page. once password is entered i need to go to the main page. wich is called form2. heres my code i hope you can help.
Public
Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim Password As StringPassword = InputBox(
"Please enter the password") If (Password = "happygilmore") Thenwhat has to go here to go to form2
ElseMsgBox(
"Incorrect Password!") End If End SubEnd
Class
switching forms
Wouss
Dim f2 As New Form2
f2.Show()
You need to decide what you're going to do with the Form1 instance. You can hide it for later use. Or you can close it. In the latter case: Project + properties, Application tab, Shutdown mode = When last form closes. Yet another approach is to make Form2 your startup form and display Form1 with ShowDialog() in the Load event.
Mitch5713
Usually the Web does this for you with redirections.
Yours is a really strange way to do it but if you must:
webBrowser.navigate("HaqpyGillmoresURL.com")
MFaucett
that dosn't even make sense buddy. and i didn't say anything about using the web...
i'm just navigating forms
Vj5