PxPlus User Forum

Main Board => Discussions => Programming => Topic started by: David Reynolds on November 22, 2023, 12:31:43 PM

Title: Monitor in Portrait Mode can't Maximize
Post by: David Reynolds on November 22, 2023, 12:31:43 PM
I've got a multi-monitor setup like the attached.
All three monitors are 1920x1080 (or 1080x1920 in the case of M3).
I've got a resizable panel (starts at XYClient=1068,800) that will maximize properly on M1 and M2, but not on M3.
If I use the maximize button it will go to a height of about 1072, or if I manually drag to resize, it caps out at 1232.
It's like it doesn't recognize that the monitor is in portrait mode and caps the height as if it were landscape.

XYMonitors returns
\\.\DISPLAY1,0,0,1920,1080
\\.\DISPLAY2,-1080,-840,0,1080
\\.\DISPLAY3,0,-1085,1920,-5

Any ideas?

Thanks!
Title: Re: Monitor in Portrait Mode can't Maximize
Post by: Mike King on November 23, 2023, 10:47:18 PM
There is a limit as to the number of lines high a window can occupy.  These limits changed in PxPlus 2021.  What version are you running?
Title: Re: Monitor in Portrait Mode can't Maximize
Post by: David Reynolds on November 24, 2023, 10:06:12 AM
Sadly, much older than that (2017).
Is there any way to tweak the MaxHeight in my current version, or is that in one of the compiled bits?

I've got a partial workaround regarding the monitor orientation.

INVOKE WAIT HIDE "[wdx]powershell Add-Type -AssemblyName System.Windows.Forms; [System.Windows.Forms.Screen]::AllScreens > Monitors.txt"

Then if I do some parsing/reformatting of the results in Monitors.txt I get:

DISPLAY1|0,0,1920,1080|0,0,1920,1034|T
DISPLAY2|-1080,-1082,1080,1920|-1080,-1082,1080,1880|F
DISPLAY3|0,-1080,1920,1080|0,-1080,1920,1040|F

I can work with that for now.