C# 窗口全屏 隐藏任务栏 (代码)

来源:互联网 发布:西安 长安 知乎 编辑:程序博客网 时间:2024/04/30 14:39

From: http://blog.csdn.net/mask_of_zorro/article/details/2351091

为了解决C# Windows应用程序全屏显示,在网上找了很多解决方法。当然其中也有成功的方法,但看起来复杂且对我等菜鸟级的人来说更难于理解。其中发现以下几行代码实现真正的全屏显示,又隐藏了任务栏,最简单高效 ... 方法优劣欢迎扔砖头

 private void Form1_Load(object sender, EventArgs e)
        {
            this.SetVisibleCore(false);
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
            this.SetVisibleCore(true);
        }

原创粉丝点击