How to initialize MDIChild dynamically in WinForms TabbedMDIManager?
Initialize MDIchild
In TabbedMDIManager, it is possible to initialize MDI Child Form. This can be achieved by following below steps.
- Need to initialize Child Form instance.
- Need to specify MDIParent, for MDI Child forms.
- Need to activate the MDI child.
Following code examples demonstrates the same.
C#
//Adds Child form into Parent form
Form2 form1 = new Form2();
form1.Text = "Child Form2";
form1.MdiParent = this;
form1.Show();VB
'Adds Child form into Parent form
Dim form1 As New Form2()
form1.Text = "Child Form2"
form1.MdiParent = Me
form1.Show()Screenshot:

Figure 1. Display child MDIForm when MenuItem is selected with image.
Samples:
C#:How to display the child MDIForm when MenuItem is selected C#
VB: How to display the child MDIForm when MenuItem is selected VB