LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW DISP.ALLMONITORS property vs. Windows IDENTIFY

LV 2023, although this happens on many previous versions.

Win 11, although this happens on previous versions.

 

I have a VI which uses the APP property DISP.ALLMONITORS to get an array of rectangles representing all monitors attached to the current system.

It then draws a picture for the user, showing the arrangement, so the user can assign a given window to a given monitor if he wants to.

It works fine.

But I never figured out WHY the order of the rectangles returned by the property is the way it is.

 

For example, on my current system, LabVIEW shows this:

Screenshot 2025-10-30 082845.png

 

The NUMBER associated with each one is the index of the array from the property (+1)

But If I right-click on the Windows desktop and choose DISPLAY SETTINGS, I get a picture that has them in a different order.
Namely 2-1-4 across the bottom, and 5-3 across the top:

Screenshot 2025-10-30 083504.png

 (The bottom center one is different because of pixel scaling - I don't care).


But why is the order different?

Any ideas?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 1 of 19
(249 Views)

 

 Just for fun, the NVIDIA control panel offers a completely different picture. Only four monitors. If I click IDENTIFY on #1, then two different monitors claim to be #1.

Am I just expecting too much?

Screenshot 2025-10-30 084510.png

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 2 of 19
(240 Views)

Maybe, the numbering is by the respective application and only valid during that active context and hence there is a identify monitors button to show the current index of each monitor?

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 3 of 19
(234 Views)

Maybe, the numbering is by the respective application and only valid during that active context

 

--- Well, that certainly fits the facts, but I would think that LabVIEW doesn't search for monitors itself - it would ask Windows what monitors are there.  And I would expect it to get the same answer as Windows itself.

Am I expecting too much?

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 4 of 19
(228 Views)

I am using LabVIEW 2018 SP1.

Disp.AllMonitors returns an array of cluster of Bounds and Depth.  No "Monitor 1" or "Monitor 2" info.  Is this something new for LabVIEW 2023?  Or is it array index?

 

I have only two monitors.  Windows Display matches NVIDIA.

 

 

 

George Zou
0 Kudos
Message 5 of 19
(198 Views)

The "Monitor 1" etc. text is generated (by my code) from the index of the array that ALLMONITORS returns.

 

I'm just wondering why that order doesn't match the order that DISPLAY SETTINGS shows.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 6 of 19
(193 Views)

Hi Steve

 

I think there are different lists of monitors: one for the currently available and one for the recently used monitors.

 

I use this little VI to get Monitor number from the registry:

 

0 Kudos
Message 7 of 19
(107 Views)

@code-lux wrote:

Hi Steve

 

I think there are different lists of monitors: one for the currently available and one for the recently used monitors.

 

I use this little VI to get Monitor number from the registry:


Can't open your VI.  Could you save it to LabVIEW 2018?

 

George Zou
0 Kudos
Message 8 of 19
(97 Views)

Thanks Code-lux.  It's obvious that there are (at least) two different lists.
I can't tell from the results which one is which, although my guess is #0 is the built-in laptop (LENOVO).  the others are DELLs.

 

image001.png

My question, though is WHY?
one for the recently used monitors

 

What is a "recently-used monitor"?  The one I looked at last? 

This is only important because it makes for a less-than-ideal user experience. 
My (LabVIEW) presentation of the monitor numbering 
doesn't match the system's version.

Steve Bird
Culverson Software - Elegant software that is a pleasure to use.
Culverson.com


LinkedIn

Blog for (mostly LabVIEW) programmers: Tips And Tricks

0 Kudos
Message 9 of 19
(93 Views)

@CoastalMaineBird wrote:

LV 2023, although this happens on many previous versions.

Win 11, although this happens on previous versions.

...


But why is the order different?

Any ideas?


 

My guess is that it has to do with the Primary Monitor.

 

Frozen_0-1762189317526.png

 

Code taken from this post I made earlier.

Hope this helps

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 10 of 19
(83 Views)