//把重复打开的隐藏掉
FormCollection fc = Application.OpenForms;
foreach (Form frm in fc)
{
if (frm.Name == "Online ")
{
try
{
frm.Hide();
}
catch (Exception ex) { }
}
}
//选择项目打开
Online go = new Online (false, this.Text, this.Text, this.Text);
go.ShowDialog();
this.Close();
c# 关闭打开的窗体根据名称
最新推荐文章于 2021-09-03 15:38:36 发布