full screen mode, but don't cover the taskbar

前端 未结 10 1321
旧巷少年郎
旧巷少年郎 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:26

    If you want to use WindowState = Maximized;, you should first indicate the size limits of the form maximized by the MaximizedBounds property...

    Example:

    MaximizedBounds = Screen.FromHandle(this.Handle).WorkingArea;
    WindowState = FormWindowState.Maximized;
    

    Where are you limiting the size of your form to the work area that is the desktop area of ​​the display

提交回复
热议问题