10-30-2025 07:39 AM
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:
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:
(The bottom center one is different because of pixel scaling - I don't care).
But why is the order different?
Any ideas?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-30-2025 07:50 AM
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?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-30-2025 08:01 AM
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?
10-30-2025 08:05 AM
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?
Blog for (mostly LabVIEW) programmers: Tips And Tricks
10-30-2025 10:01 AM
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.
10-30-2025 10:27 AM
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2025 09:01 AM
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:
11-03-2025 09:48 AM
@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?
11-03-2025 10:07 AM
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.
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.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2025 11:03 AM - edited 11-03-2025 11:04 AM
@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.
Code taken from this post I made earlier.
Hope this helps