In the windows desktop properties all the displays are shown and are indicated to be active or inactive. My graphics card has a monitor connected to the dvi port but not the vga and this is correctly determined (i.e. one of the displays is labelled inactive). I also have a usb displaylink lcd which is also detected.
Using system.windows.forms.screen.allscreens I am able to enumerate all the possible displays (in this case, 3) on my system but I am unable to determine which ones are active (i.e. actually have a device connected to them). Is this possible in .net?
None of the properties of system.windows.forms.screen seem to have this information.
EDIT: Noted that my question is actually a duplicate of this question but I only found it after Hans Passant directed me to looking at WMI.