C# – full screen mode, but don’t cover the taskbar

cnetwinforms

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 cover the taskbar.

How can this be done?

Best Answer

The way I do it is via this code:

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