yewmeng Posted December 22, 2003 Posted December 22, 2003 hi all, pls help me to solve this problem i have 3 forms form1 -> mdi parent form2 + button1 -> mdi child form 3 -> mdi child form2 n form3 access by clicking the menu at form1 now when i click at button1 in form2, form3 will show i have tried the following code, the form was show but not inside the parent form1 dim form3 as new form3 form3.show pls help me thx in advance Quote
Leaders dynamic_sysop Posted December 22, 2003 Leaders Posted December 22, 2003 ok , when loading Form2 in to your mid form .... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '/// in Form1 Dim frm2 As New Form2() frm2.MdiParent = DirectCast(Me, Form1) frm2.Show() End Sub then when loading Form3 from Form2 .... Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click '/// in Form2 Dim frm3 As New Form3() frm3.MdiParent = DirectCast(Me.MdiParent, Form1) frm3.Show() End Sub Quote
yewmeng Posted December 25, 2003 Author Posted December 25, 2003 its working !!!! thx so much and have a nice day Quote
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.