纪连海正说清史mp3:在C#中 如何让MDI的子窗体不重复
来源:百度文库 编辑:高校问答 时间:2024/05/21 22:31:09
foreach (Form froms in this.MdiChildren )
{//获取MID里的所有子窗体
if (froms is Form2)
{//判断是否有Form2
froms.Focus();//获得焦点
return;//退出过程
}
}//没有Form2就Show 一个出来
Form2 f = new Form2();
f.MdiParent = this;
f.Show();