I dock the taskbar to the left, which causes many windows to open underneath the taskbar.
None of the System.Windows.Form.FormStartPosition values take into account the taskbar except for Manual. Is this by design? It's frustrating. I want to respect the default monitor and window position values that the OS should enforce.
Well, if WinForms doesn't do this automatically, you may have to set this manually.
You'd have to use System.Windows.Forms.Screen.PrimaryScreen.WorkingArea to get the area of the screen without the taskbar, and use that Rectangle to compute the startup area for the form manually, and set it as the Form's Bounds property. (Make sure the form is using FormStartPosition.Manual).
I think there is no .NET way to do that. I don't see any reasons to have such one.
You can locate taskbar position and put your form there manually.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With