11-03-2025 01:37 PM
here you go with LV2018
11-03-2025 02:25 PM
My guess is that it has to do with the Primary Monitor.
I can change the primary monitor, and my LabVIEW code does nothing different, except draw the red ring around the new primary.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2025 02:34 PM - edited 11-03-2025 02:36 PM
@CoastalMaineBird wrote:
My guess is that it has to do with the Primary Monitor.
I can change the primary monitor, and my LabVIEW code does nothing different, except draw the red ring around the new primary.
I tried the same thing. No change.
It seems NI defines their own screen#. The array index IS screen#.
Could someone test this on other OS?
11-03-2025 02:57 PM
The array index IS screen#.
Yeah, that's where my LV code gets the "Monitor 1" string.
But why is Windows Different?
If I unplug one of the monitors, the orientation rearranges itself into whatever order it feels like. But the numbering between Windows and LV is still different.
If I plug it back in, it returns to the way it was before, still different between Win and LV.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2025 03:02 PM
If I unplug TWO monitors, and then plug them back in IN A DIFFERENT ORDER, then Windows doesn't change the ordering, but LabVIEW DOES !
Blog for (mostly LabVIEW) programmers: Tips And Tricks
11-03-2025 03:14 PM
> If I plug it back in, it returns to the way it was before, still different between Win and LV.
Maybe other OS handles multiple monitors different from Windows.
11-03-2025 03:24 PM
LabVIEW simply uses the multimonitor API of the underlaying platform. In Windows this is EnumDisplayMonitors() https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-enumdisplaymonitors
Unfortunately it uses a callback function so is pretty hard (not impossible but very cumbersome) to interface through it through the Call Library Node.
11-03-2025 03:45 PM
The .net method returns exactly the same results as LabVIEW (tested with 3 monitors).
11-03-2025 04:07 PM
I found this on MS web site: