Hi All,
I want to open a Form inside another Form.
at present time both forms are opening seperatly.
How can I open the second Form inside the first Form...
thanx a lot in advance
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Aug 5, 2012, 3:44 PM
Form2 f2 = new Form2();
f2.TopLevel = false;
this.Controls.Add(f2);
f2.Show();
An alternative approach would be to make Form2 an MDI child of Form1. To do this, you first need to set Form1's IsMdiContainer property to true in the Properties Box. The code to open Form2 would then be:
Form2 f2 = new Form2();
f2.MdiParent = this;
f2.Show();
ilhami caliskanPosted Aug 5, 2012, 11:47 PM