1

I am developing a windows form application where one of the forms uses the border style of SizableToolWindow however this causes issues when you have the windows taskbar set to the side of the screen. form going under taskbar

Is there any possible way to stop this happening without moving the taskbar?

Solved Changed the window border to "sizeable"

Todd Owen
  • 97
  • 1
  • 9
  • 1
    You could set the Form's MaximumSize to the current screen WorkingArea.Size: `this.MaximumSize = Screen.FromHandle(this.Handle).WorkingArea.Size;` (but, cannot test this right now). Tool Windows are not supposed to be maximized, though. – Jimi Apr 02 '19 at 16:05
  • Your method works however it leave about a 15px gap on the right and bottom of the form – Todd Owen Apr 02 '19 at 16:08
  • That's the transparent border size. Add it to the maximun size. There's a SystemInformation property that reports that measure. It could be `SystemInformation.BorderSize` or `SystemInformation.Border3DSize`. See here: [Using SetWindowPos with multiple monitors](https://stackoverflow.com/a/53026765/7444103) for more informations on the subject. – Jimi Apr 02 '19 at 16:09
  • 1
    @ToddOwen Any reasons why you are using a `ToolWindow` when what you actually want to display is not a `ToolWindow` ? This works perfectly with a standard window – Franck Apr 02 '19 at 16:17

1 Answers1

0

Changed the window border to "sizeable"

suggested

Any reasons why you are using a ToolWindow when what you actually want to display is not a ToolWindow ? This works perfectly with a standard window – Franck

Todd Owen
  • 97
  • 1
  • 9