Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

  • Leaders
Posted

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...