gordonwilson
Technical User
Hi
I am new to VB.NET and basically am having problems opening and closing forms.
To open a form this is what I do:
Dim AddEntry as New Form2
AddEntry.Show
To close a form (say after a save operation):
Me.Hide
or
AddEntry.Hide
Now. Here is the tricky part. If I use the X button to close the window the next time the program tries to open it I get the following error "Cannot access a disposed object named "Form2"
Has anyone seen this before?
What am I doing wrong?
I am new to VB.NET and basically am having problems opening and closing forms.
To open a form this is what I do:
Dim AddEntry as New Form2
AddEntry.Show
To close a form (say after a save operation):
Me.Hide
or
AddEntry.Hide
Now. Here is the tricky part. If I use the X button to close the window the next time the program tries to open it I get the following error "Cannot access a disposed object named "Form2"
Has anyone seen this before?
What am I doing wrong?