Maximized screen ignores taskbar

前端 未结 8 1740
刺人心
刺人心 2020-12-20 16:53

I have a form I set to Maximized, but for some reason it\'s ignoring the taskbar and maximizing to the entire screen. Is that typical? Is there a workaround?

8条回答
  •  无人及你
    2020-12-20 17:07

    If you are using FormBorderStyle.None then it is very simple to make sure it doesn't cover the taskbar when maximized:

    this.MaximumSize = Screen.PrimaryScreen.WorkingArea.Size;
    

    It will probably work for other border styles and is probably the cleanest way to ensure your form does not cover the taskbar.

提交回复
热议问题