首页 > Windows开发 > 详细

C# Net WinForm 全屏,不带任务栏,带任务栏

时间:2020-08-21 17:40:03      阅读:220      评论:0      收藏:0      [点我收藏+]

WinForm 全屏

 

不带任务栏

    public partial class Form1 : Form
    {
        public Form1()
        {
            //可交换顺序(方式1)
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
            InitializeComponent();
            //可交换顺序(方式2)
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
        }
        private void Form1_Load(object sender, EventArgs e)
        {
            //不可交换顺序(方式3)
            this.FormBorderStyle = FormBorderStyle.None;
            this.WindowState = FormWindowState.Maximized;
        }
    }

  

 

 

带任务栏

    public partial class Form1 : Form
    {
        public Form1()
        {

            InitializeComponent();

        }
        private void Form1_Load(object sender, EventArgs e)
        {
            //不可交换顺序
            this.WindowState = FormWindowState.Maximized;
            this.FormBorderStyle = FormBorderStyle.None;
        }
    }

  

C# Net WinForm 全屏,不带任务栏,带任务栏

原文:https://www.cnblogs.com/ping9719/p/13541915.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!