Maximized screen ignores taskbar

前端 未结 8 1730
刺人心
刺人心 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条回答
  •  旧时难觅i
    2020-12-20 17:14

    Set the form border to None before making it maximized.

    This code will work in a single monitor:

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

    I haven't tested the dual monitor scenario since i don't have this at this moment. :P

    EDIT: I didn't get it "Maximized Screen Ignores Taskbar". What does Ignores mean?

    Do you want your form to cover the taskbar and fill the entire screen?

提交回复
热议问题