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 .
varun sharmaPosted Jul 8, 2008, 1:17 AM
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();
Satish KathiPosted Jul 7, 2008, 4:35 PM