Opening Form

lothos12345

Junior Contributor
Joined
May 2, 2002
Messages
294
Location
Texas
My program has two forms form1 and form2. I want to create a button on form1 to open form2 when the program is running. Not quite sure how to accomplish this. Any help with this question is greatly appreciated.
 
Hi, may i know why we have to do DIM m as New Form2?
why dont we just type: form2.show?

in another word, what is the meaning of defining a variable " Dim M as NEW Form2" ?

Thank you for your reply as i am quite confused with the migration from vb6 to vb.net :)
 
There is no longer a default instance of a form with the same name. Forms are just classes, and you need to declare an instance of them before you can work with them.
 
Back
Top