LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LabVIEW DISP.ALLMONITORS property vs. Windows IDENTIFY

here you go with LV2018

0 Kudos
Message 11 of 19
(96 Views)

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.

 

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 12 of 19
(85 Views)

@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?

 

George Zou
0 Kudos
Message 13 of 19
(81 Views)

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.

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 14 of 19
(75 Views)

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 !

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 15 of 19
(72 Views)

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.

 

George Zou
0 Kudos
Message 16 of 19
(69 Views)

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.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 17 of 19
(68 Views)

The .net method returns exactly the same results as LabVIEW (tested with 3 monitors).

 

George Zou
0 Kudos
Message 18 of 19
(55 Views)
0 Kudos
Message 19 of 19
(49 Views)