c# Hide the open window and open the login window for a detailed introduction
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();
The above is the c# Hide the open window and open the login window for a detailed introduction. For more related content, please pay attention to the PHP Chinese website (www.php.cn)!