full screen mode, but don't cover the taskbar

前端 未结 10 1327
旧巷少年郎
旧巷少年郎 2020-12-05 19:38

I have a WinForms application, which is set to full screen mode when I login.

My problem is it\'s covering the Windows taskbar also. I don\'t want my application to

10条回答
  •  遥遥无期
    2020-12-05 20:29

    Try without FormBorderStyle = System.Windows.Forms.FormBorderStyle.None; and comment line like :

    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
    
        private void Form1_Load( object sender, EventArgs e )
        {
            // FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
            Left = Top = 0;
            Width = Screen.PrimaryScreen.WorkingArea.Width;
            Height = Screen.PrimaryScreen.WorkingArea.Height;
        }
    }
    

提交回复
热议问题