Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get Screen Size for 3rd Monitor
#1
I'm sure that this is super simple for others, but it has been a challenge for me.

How do I get the screen size (x y) for my 3rd monitor?   Huh
#2
Macro Macro940
Code:
Copy      Help
int wid hei
GetWorkArea 0 0 wid hei 1 3
out F"{wid} {hei}"
#3
Macro Macro940
Code:
Copy      Help
RECT r
MonitorFromIndex 3 0 r
out "L=%i T=%i R=%i B=%i   W=%i H=%i" r.left r.top r.right r.bottom r.right-r.left r.bottom-r.top
#4
Gintaras, you are the best!
Many thanks for such a quick response, it is greatly appreciated!
#5
As a follow up, how is the monitor number determined?

According to windows, my 3 monitors are setup in the following order from left to right: 3, 1, 2 (see attached). Monitor 1 in this layout is my primary according to windows.

I wrote a test script to display a message on each monitor and QM thinks my monitors are in this order:  1, 3, 2

So, I'm not sure how to determine the order that QM sees my monitors. This makes it difficult to be sure that I am performing a function on the expected monitor.

Is there any way to know the order for sure?


Attached Files Image(s)
   
#6
QM uses Windows function EnumDisplayMonitors. It returns monitors in different order than in Windows Settings. It seems there are no other ways.

https://stackoverflow.com/questions/1305...ect=1&lq=1
https://stackoverflow.com/questions/1134...rogrammati


Forum Jump:


Users browsing this thread: 2 Guest(s)