lothos12345 Posted October 15, 2002 Posted October 15, 2002 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. Quote
*Gurus* Derek Stone Posted October 15, 2002 *Gurus* Posted October 15, 2002 Dim m As New Form2 m.Show() Quote Posting Guidelines
silverstormboy Posted January 16, 2003 Posted January 16, 2003 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 :) Quote
*Gurus* divil Posted January 16, 2003 *Gurus* Posted January 16, 2003 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. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.