how to set a form as a child form to an MdiParent?

mutlyp

Member
Joined
Oct 11, 2012
Messages
8
Programming Experience
10+
I have an MdiParent form and several child forms that open inside the MdiParent.
But within one of the child forms(lets call it Form1) I have a button that when clicked it opens another form(lets call Form2). The problem is that when I click the button on Form1 it opens Form2 but Form2 is not a child of the MdiParent. I can move Form2 outside the MdiParent borders.
I've tried to set Form2.parent = MdiForm but that does not work.
What am I doing wrong?
Thank you
 
Back
Top