Hi Everyone,
I have not used Visual Basic since version 3. I have VB 2005 Express now.
While some things are the same, others have changed and are driving me absolutely crazy.
Here's my current problem:
The app starts by loading Form1
Form1 is basically a registration screen. The end user of my software will put in there email address and registration code. I have already programmed the functionality so it checks the email address and registration code by making a POST to a PHP Script.
If the PHP Script reply's back that it is a valid REG Code, certain registry keys are set, then Form1 should hide, and form2 should show.
The next time the software is loaded, The load statement checks if the Registry keys are in place.. If they are, Form1 should hide immediately, and form2 should show.
This is where the problem lies.. Form2 is shown, but form1 never gets hidden.
Here's the Form1_Load code
I am not exactly sure what the problem is, Why can't I hide Form1?
I have not used Visual Basic since version 3. I have VB 2005 Express now.
While some things are the same, others have changed and are driving me absolutely crazy.
Here's my current problem:
The app starts by loading Form1
Form1 is basically a registration screen. The end user of my software will put in there email address and registration code. I have already programmed the functionality so it checks the email address and registration code by making a POST to a PHP Script.
If the PHP Script reply's back that it is a valid REG Code, certain registry keys are set, then Form1 should hide, and form2 should show.
The next time the software is loaded, The load statement checks if the Registry keys are in place.. If they are, Form1 should hide immediately, and form2 should show.
This is where the problem lies.. Form2 is shown, but form1 never gets hidden.
Here's the Form1_Load code
VB.NET:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'Not going to type the code...but this is where it checks for registry key
If RegKey = True Then
Dim nForm As Form = New Form2
nForm.Show()
Me.Hide()
End if
End Sub
I am not exactly sure what the problem is, Why can't I hide Form1?