Zac123
asked on
VB2010 - MDI Settings, child form not bound
hi all,
please can you have a look at my code.
basically when i click the button on form1 i want form2 to open but to be bound within form1 which is set as mdi = true
but when i click on the button form2 opens but it is free to travel outside of the form1, i.e. it does not apear to be bound by form1
any ideas?
please can you have a look at my code.
basically when i click the button on form1 i want form2 to open but to be bound within form1 which is set as mdi = true
but when i click on the button form2 opens but it is free to travel outside of the form1, i.e. it does not apear to be bound by form1
any ideas?
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Form2.MdiParent = Me
End Sub
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
Form2.MdiParent = Me.MdiParent
Form2.Show()
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
*This fixed it because when you had "Me.MdiParent", you were assigning NOTHING as the MdiParent of Form2, since Form1 does not have an MdiParent.
ASKER