joeybagadonutz Posted November 6, 2003 Posted November 6, 2003 Hi, Im new to vs.net, using vb.net.... I have form1, and it has a button...the on click even I want it to load form 2, what is the correct syntax? Thanks, -JBD Quote
*Experts* mutant Posted November 6, 2003 *Experts* Posted November 6, 2003 You need to first create an instance of the form and the show it: 'create a new isntance Dim f2 As New Form2 'use the Show method to show the form f2.Show() Quote
joeybagadonutz Posted November 6, 2003 Author Posted November 6, 2003 Hi, that works, but it dims a new form. In the solution explorer, I have another form already created, I want to load that form not create and open a new one. What am I missing here? thanks. Quote
Nightyhawk Posted November 6, 2003 Posted November 6, 2003 StartupFrm Hi, that works, but it dims a new form. In the solution explorer, I have another form already created, I want to load that form not create and open a new one. What am I missing here? thanks. Right-click solutions explorer, and go to Properties|Start-up frm and select a form to load when program executes. I hope that helps. Take care, Lori :D Quote Take care, Lori :D --DreamWEBCatcher.com
joeybagadonutz Posted November 6, 2003 Author Posted November 6, 2003 Hi, yes that works, thanks very much. It is actually enough to get me going on what I'm doing. But juts out of curiousity, if I do want to load another form in the project from an existing form, how do I do that? thanks. Quote
Nightyhawk Posted November 6, 2003 Posted November 6, 2003 Hi, yes that works, thanks very much. It is actually enough to get me going on what I'm doing. But juts out of curiousity, if I do want to load another form in the project from an existing form, how do I do that? thanks. Shared Sub Main() System.Windows.Form.Application.Run(New Form1) End Sub Type that code at the top of the form. Good luck. Take care, Lori Quote Take care, Lori :D --DreamWEBCatcher.com
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.