Dynamic Creation Of Panel
public void CreateMyPanel()
{
Panel panel1 = new Panel();
TextBox textBox1 = new TextBox();
Label label1 = new Label();
panel1.Location = new Point(56,72);
panel1.Size = new Size(264, 152);
panel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
label1.Location = new Point(16,16);
label1.Text = "label1";
label1.Size = new Size(104, 16);
textBox1.Location = new Point(16,32);
textBox1.Text = "";
textBox1.Size = new Size(152, 20);
this.Controls.Add(panel1);
panel1.Controls.Add(label1);
panel1.Controls.Add(textBox1);
}
Now Suppose You Have A Button On Your Form And On The Click Event You Want To Show The Panel Then,
private void btnButton1_Click(object sender, EventArgs e)
{
panel1.visible = true;
}
Accept This Answer If It Has Helped You