Wilken 2010-08-16 19:44
Hi,
we work with two monitors, If both monitors in horizontal position (not turned), all works fine.
The second monitor is turned by 90th grad (documentmonitor). Can I find out, which is rotated monitor?
For the positioning of windows, I've swap height and width, unfortunately this is not enough, that it works in an rotated environment.
Any ideas?
Thank's Wilken
|
Christian Studer 2010-08-17 09:03
Not directly, but you could check if Monitor.Height is greater than Monitor.Width, in that case the monitor is in portrait mode.
The next release will have an Orientation property for the Monitor object.
Christian Studer - www.realtimesoft.com
|
Wilken 2010-08-17 17:11
Hi,
yes, but if have an 1024*1280 screen an I move the windows
xmp> UltraMonWindow1 := TUltraMonWindow.Create(nil); try UltraMonWindow1.HWnd := h; if (UltraMonWindow1.Monitor <> PDFMonitor) or (UltraMonWindow1.Left <> 0) or (UltraMonWindow1.Top <> 0) or (UltraMonWindow1.Width <> MaxWidth) or (UltraMonWindow1.Height <> MaxHeight) then begin UltraMonWindow1.Left := 0; UltraMonWindow1.Top := 0; UltraMonWindow1.Width := Maxwidth; UltraMonWindow1.Height := MaxHeight; UltraMonWindow1.ShowState := SHOWSTATE_NORMAL; UltraMonWindow1.ApplyChanges(0); UltraMonWindow1.Monitor := PDFMonitor; UltraMonWindow1.ApplyChanges(0); end; finally freeandnil(UltraMonWindow1); end;
in portait mode it works, but in landscape mode the windowedge is here on the 818 position not on the 1024.
818
+--------------+------+
| | |
| | |
| | | 1280
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
+--------------+------+
1024
I dont know where is my mistake?
Greetings Wilken
1024
|
Christian Studer 2010-08-18 09:12
To what are MaxWidth and MaxHeight set?
Christian Studer - www.realtimesoft.com
|
Wilken 2010-08-18 22:04
Hi,
maxwidth and maxheigth are the maximum values of the screen (the monitorsize).
Wilken
|
Christian Studer 2010-08-19 09:02
I'm not sure what would cause this, if MaxWidth and MaxHeight are correct this should work fine in both landscape and portrait mode.
BTW, you don't need to set the Monitor property as well, setting the position of the window is enough. You could also set only the Monitor property, but setting both isn't needed.
Christian Studer - www.realtimesoft.com
|
Wilken 2010-08-19 18:00
Hallo,
i think also, the windowpositioning shouldt work on both, but if I set the property to 1024 the window ist not on 1024 but is on 818. I set only the window position. The properties of the monitorsize are necessary to calc the maximum size of the window. Now I try the positioning by the windows api, maybe an error in the displaydriver.
Wilken
|