How to get order of desktops?

Just starting out? Need help? Post your questions and find answers here.
User avatar
skywalk
Addict
Addict
Posts: 4242
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

How to get order of desktops?

Post by skywalk »

Windows 10 or 11, compiled with/without DPI aware:
I have 3 stacked monitors in multiple setups but ExamineDesktops() returns different polarities.
This makes it harder to arrange some of my windows.
On Windows, if I edit System -> Display - Rearrange your displays
as below, how can I retrieve the rearranged number in square brackets? [x]
[1]=laptop, [2] and [3] are external monitors stacked above the laptop.

Code: Select all

; PC1
; [ 3 ] 0,0
; [ 2 ] 0,1080
;  [1]  0,2160
; PC2
; [ 3 ] 0,0
; [ 2 ] 0,-2160
;  [1]  0,-1080

Code: Select all

Display,DesktopName,Width,Height,ResolutionX,ResolutionY,X,Y
1,\\.\DISPLAY1,1920,1080,1,1,0,0
4,\\.\DISPLAY4,1920,1080,1,1,0,-2160;<-- Is this Display 2 or 3?
5,\\.\DISPLAY5,1920,1080,1,1,0,-1080;<-- Is this Display 2 or 3?
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum