I've been fighting with this for about a week. I want my main form to be centered on the screen, not maximized, and sized to account for the task bar, regardless of it's location. Making the form a specific "too small" size then just set position to WorkAreaCenter is simple enough, but that means I'm not using all the screen real estate available which in my case..I need every possible pixel to be available. No matter what I do with
Screen.Height/.Width
Screen.WorkArea.Height/.Width
Monitor.WorkareaRect.Width or Monitor.WorkareaRect.Height
my main window always is about 8 pixels too large and behind the task bar.
By playing with form fsMaximized versus fsNormal I have determined that the Screen.x and Monitor.x are lying. They say that the task bar is a full 40 pixels high, but it's not. It's actually only 32 pixels high. So I have to go burrowing through all the rabbit holes trying various ways to calculate the true height/width of the task bar and position my main window accordingly. I am using Lazarus 1.8.4, FPC 3.0.4 on Windows server 2016, and my monitor is a SuperWide 2560 wide by 1080 high.
This might help, if there was a Lazarus equivalent to it:
http://dn.embarcadero.com/article/26977What is the Lazarus way of accomplishing this simple task? Thanks in advance for any help you can provide.