Click here to Skip to main content
15,885,953 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
hello i want to create mdiform and his child form please give code with design and about mdi form
thank u....
Posted
Comments
Sandeep Mewara 25-Sep-10 5:55am    
Why to do a repost? http://www.codeproject.com/Questions/112687/how-to-make-of-mdi-form-his-child-form.aspx

C#
protected void MDIChildNew_Click(object sender, System.EventArgs e){
   Form2 newMDIChild = new Form2();
   // Set the Parent Form of the Child window.
   newMDIChild.MdiParent = this;
   // Display the new form.
   newMDIChild.Show();
}


http://msdn.microsoft.com/en-us/library/7aw8zc76(VS.80).aspx[^]


Also If you want to permanently set "Form2" as an Mdichild of "Form1"

the put the folowing line in form2_Load

C#
private void Form2_Load(object sender, EventArgs e)
{
 newMDIChild.MdiParent = Form1;
}
 
Share this answer
 
v2
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900