解决winform当前打开的窗体关闭问题
1、关闭所有打开的窗体:
application.exist;
2、关闭当前打开的某一个窗体
foreach(var item in application.openform)
{
if(item="form1")
item.closed;
}