How to match WmiMonitorBasicDisplayParams to each monitor - 09-18-2009 , 12:47 AM
When enumerating the instances of WmiMonitorBasicDisplayParams, how
does one match a particular instance to a monitor in windows
(HMONITOR, windows device name, etc)?
The only identifier returned by that WMI query is InstanceName, which
seems to correspond to a PNP Device ID. It seems to be very difficult
to properly relate this ID to a display name returned by windows
obtained either through System.Windows.Forms.Screen.AllScreens or
EnumDisplayDevices. Those names are generally something like "\\.
The only way I've found seems totally unreliable (requires trolling
obscure entries in the registry). I'm looking for more of "windows-
sanctioned" way to determine which monitor is being referenced by each
instance of WmiMonitorBasicDisplayParams.
I want to know this because I'd like to estimate the physical
dimensions of each display and compare that to the resolution that the
display is running and determine if the user is using non-square
|Thread Tools||Search this Thread|