Windows Forms: How to Add the Form in Panel from another Form in C#

This post shows you How to open a Form in a Panel in C# .NET Windows Forms Application.

How to open a Form in a Panel using C#

The panel is a Windows Forms control that lets you add other controls to it.

In addition to adding UserControl or Control to the Panel, sometimes you will need to create an application that allows you to open multiple Forms in a Panel from one Form. You can easily add Form in Panel C# in the following way.

Creating a new Windows Forms Application project, then open your form designer. Next, You can drag Button, Label, Combobox and Panel controls from your Visual Studio Toolbox to your winform.

c# open multiple forms in panel

Next, Create a new Form with the name Form2, then you can design a simple UI as shown below.

simple winform in c#

Clicking the Combobox control in Form1, then select Edit Items...

string collection editor

Next, You need to add the above items into the combobox.

You can also create Form3, Form4...etc, then open your form similarly in the following way.

How to load a form inside another form in c#

Adding a click event handler to the ShowForm button allows you to open a new Form inside a Panel in C# as shown below.

private void btnShowForm_Click(object sender, EventArgs e)
    Form2 frm = new Form2() { TopLevel = false, TopMost = true };
    frm.FormBorderStyle = (FormBorderStyle)cboFormStyle.SelectedIndex;

If you want to open new form in same window or load form inside panel other form in c# , i think this is the best solution.