There is no
functional child-parent relationship between forms.
I mean,
Form
still have child-parent
properties System.Windows.Forms.Control.Parent
and
System.Window.Forms.Control.Controls
but these properties are made defunct if you try to make one form a child of another form. An exception will be thrown.
There is a work-around, but I would advise not to use it. You can assign
Form.TopLevel
property to false, and then such form could be inserted as a child of another form. It will look ugly. If the child form has non-client area, the parent form will go inside the parent form with all the non-client area.
Windows is not really designed to use such pathological things. This would violate most basic design principles. Also, this is never needed. For a children of the
Form
you can use other container controls like
Panel
,
TabControl
and the like.
Please see my past answer on this topic:
Parent Child Form Relationship[
^].
See also:
http://msdn.microsoft.com/en-us/library/system.windows.forms.form.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.panel.aspx[
^],
http://msdn.microsoft.com/en-us/library/system.windows.forms.tabcontrol.aspx[
^].
I did not mention a very different relationship: between MDI parent and MDI children. This is totally different story, but I don't recommend using MDI. It is highly discouraged even by Microsoft. You don't need to torture your head and scare off you users with this ugly style.
Please see:
http://en.wikipedia.org/wiki/Multiple_document_interface#Disadvantages[
^],
How to Create MDI Parent Window in WPF?[
^],
Question on using MDI windows in WPF[
^],
MDIContainer giving error[
^],
How to set child forms maximized, last childform minimized[
^].
Some of my past answers are referenced above, I explain what can you do instead.