Home  >  Article  >  Backend Development  >  c# Detailed introduction to hiding open windows and opening login windows

c# Detailed introduction to hiding open windows and opening login windows

黄舟
黄舟Original
2017-03-02 11:34:351526browse

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)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn