YZlat
asked on
open a from
I have two forms in my project, Form1 and Form2. I'm trying to open Form2 from Form1:
In the Form1_Load event I have:
Dim f As Form2=New Form2
f.Show() <- get an error here - "Object reference not set to an instance of an object."
What am I doing wrong?
In the Form1_Load event I have:
Dim f As Form2=New Form2
f.Show() <- get an error here - "Object reference not set to an instance of an object."
What am I doing wrong?
put a break point in the formload of page 2 and check your variables there.
Dim f As New Form2
f.Show()
f.Show()
ASKER
davidrichardson I've tried that already
mydasx, in line Dim f As Form2=New Form2, f is fine, but it still gives me an error in line
f.Show
mydasx, in line Dim f As Form2=New Form2, f is fine, but it still gives me an error in line
f.Show
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
it does not even get to Form2_Load
did you hit f11 on the call?