Articles in this section
Category / Section

How to initialize MDIChild dynamically in WinForms TabbedMDIManager?

1 min read

Initialize MDIchild

In TabbedMDIManager, it is possible to initialize MDI Child Form. This can be achieved by following below steps.

1)Need to initialize Child Form instance.

2)Need to specify MDIParent, for MDI Child forms.

3)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                                                        Display child MDIForm when menu item is selected with image

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

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied