Click here to Skip to main content
15,900,110 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have one MDI Parent form and 4 other Forms(Form1,Form2,Form3,Form4) Form1 is show under MDI when i click menu Strip item of MDI and When i submit some value through form1, new form open but not inside of MDI parent Form and all other Froms are also shows out side from MDI. How can I make them part of MDI so they can visible inside of MDI.

Thanks
Posted
Comments
Rockstar_ 3-Jun-13 7:35am    
Use formname.ShowDialog() method instead of Show()
ashu_dhiman 3-Jun-13 8:02am    
ok But i want to open all these forms inside MDIparent as From1 is opening.
CHill60 3-Jun-13 8:03am    
That doesn't actually solve the OPs problem
ashu_dhiman 7-Jun-13 2:23am    
can anyone suggest me a solution of my prblem
CHill60 7-Jun-13 4:26am    
If the solution I gave you below doesn't work then use the "Have a Question or Comment?" link on that solution to explain what the problem is

Set the MdiParent property of the other forms at runtime before displaying the form
e.g.
Form2 f2 = new Form2();
f2.MdiParent = this;
f2.Show();
 
Share this answer
 
Comments
ashu_dhiman 7-Jun-13 5:17am    
this solution is not working. The problem is children form of MDIparent child form is going out side of MDI area and i didn't want that i want all of them inside MDIparent.
Form childForm = new Form();
childForm.MdiParent = this;
childForm.Show();

try this
 
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