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

黄舟
Release: 2017-03-02 11:34:35
Original
1578 people have browsed it

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();
Copy after login

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


source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!