Configure Parent and child form using MDI on Visual Studio 2005
Configure Parent and child form using MDI on Visual Studio 2005
?
Step 1) Open or Create New Project
Step 2) Add New from Name As mainFrm
? ? ? ? ? ? ? ? ? ? ?
? ? ? ? ? ? ? ? ? ? ? Set property as below
1)? ? ? ? ? isMdiContainer=true;
Add Menu strip from the toolbar
? ? ? ? ? ? ? ? ? ? ? Add File menu
? ? ? ? ? ? ? ? ? ? ? Add Child form1 menu (from name is frmChild)
?
Add New Form with
? ? ? ? ? ? ? ? ? ? ? Save form name as frmChild
?
?
Now go to mainFrm
? ? ? ? ? ? ? ? ? ? ? Select MenuStrip
? ? ? ? ? ? ? ? ? ? ? Select Child form submenu
?
Goto to property of menustrip Control
Click on Event Tab
Click on click Event
?
And add below code in? Click Event
?
Form childForms;? ? ? ? ? ? ? ? ? ? ? childForms = new frmChild ();? ? ? ? ? ? ? ? ? ? ? childForms.Text = “ChildForm”; //+ Conversion.Str(childForm);? ? ? ? ? ? ? ? ? ? ? //setting title for child windows and incrementing the number with an array? ? ? ? ? ? ? ? ? ? ? childForms.MdiParent = this;
? ? ? ? ? ? ? ? ? ? ? childForms.Show();
?
?
?
?
?