|
-
Jan 8th, 2004, 07:24 PM
#1
Thread Starter
New Member
load a second form from first form...[RSOLVED]
in VB.net
If I have 2 forms in a project how do I load the second form using a button in the first form.
Last edited by marq; Jan 8th, 2004 at 11:20 PM.
-
Jan 8th, 2004, 11:19 PM
#2
Thread Starter
New Member
nevermind resolved it myself....it is a bit different than vb6
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim frm2 As New Form2()
frm2.Show()
End Sub
note there is not any error handling- apparently you have to declare a new instance of the class Form2 and then .Show() that instance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|