How can I create a form, an invisible Windows taskbar?

I set the taskbar to the left, which causes many windows to open under the taskbar.

None of the System.Windows.Form.FormStartPosition values ​​take into account the taskbar except Manual. Is it for design? This is frustrating. I want to respect the default values ​​for the monitor and the window position that the OS should execute.

+6
winforms taskbar
source share
2 answers

Well, if WinForms does not do this automatically, you may need to install it manually.

You will need to use System.Windows.Forms.Screen.PrimaryScreen.WorkingArea to get the screen area without the taskbar, and use this rectangle to calculate the startup area for the form manually and set it as Form Property. (Make sure the form uses FormStartPosition.Manual).

+5
source share

I think there is no .NET way to do this. I see no reason to have one.

You can find the position of the taskbar and place your form there manually.

+1
source share

All Articles