c# 隐藏已打开的窗口,打开登陆窗口的详细介绍
formcollection fc = application.openforms;//获得已打开的窗口
//循环隐藏
if (fc != null && fc.count > 0)
{
foreach (form window in fc)
{
window.hide();
}
}
//清空保存的用户信息
cachehelper.curusername = "";
cachehelper.curuserrole = -1;
//打开登陆窗口
frmlogin fl = new frmlogin();
fl.show();
以上就是c# 隐藏已打开的窗口,打开登陆窗口的详细介绍的内容。