110,570
社区成员
发帖
与我相关
我的任务
分享
if (this.panel1.Controls.Count > 0)
{
Control ctl = this.panel1.Controls[0];
if (ctl is Form1)
{
}
else if (ctl is Form2)
{
Form2 fmChild = ctl as Form2;
fmChild.ClosePort();
}
else if (ctl is Form3)
{
}
}
this.panel1.Controls.Clear();
Form1 systemset = new Form1();
systemset.FormBorderStyle = FormBorderStyle.None;
systemset.TopLevel = false;
this.panel1.Controls.Add(systemset);
systemset.Show();