Opening a form in a panel
i have a C# windows application in visual studio with 2 forms-Form1 and Form2. Form1 is divided into two panels-panel1 and panel2 using a split-container. panel1 contains a link- label and i want that on clicking the link-label, Form2 should be opened in panel2 .
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Satish KathiRank #8,369 · 223 reputationPosted Jul 7, 2008, 12:35 PM EDT
varun sharma5 reputationPosted Jul 7, 2008, 9:17 PM EDT
thanks for replying to my query Satish. I have found the answer. To open form2 in panel2,the coding for the link label would be:
Form2 f1 = new Form2();
f1.TopLevel = false;
splitContainer1.Panel2.Controls.Add(f1);
f1.Show();
f1.BringToFront();