Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, March 8, 2018 7:39 AM
Hi all,
As in Windows 7, the monitors connected to the system will be put under "HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY", and there is one key named "Control" which could identify whether the monitor is currently connected(active) to the system. By the way, one key named "Device Parameters" is also put under the same level of "Control" which contain the monitor information.
Now in Windows 10, the "Control" key is gone, and it could not be found any more. So the question is where can we find the information to identify the connected monitor to PC?
Or it there any other ways to retrieve the "Screen Size/Resolution/Pixel Size" information for the connected monitors to PC? Please be noted our system would have dual display sometimes.
Thanks,
Guohao
All replies (6)
Thursday, March 15, 2018 3:05 AM âś…Answered
Sample solution code
ManagementObjectSearcher searcher =
new ManagementObjectSearcher("root\CIMV2",
"SELECT * FROM Win32_DesktopMonitor");
foreach (ManagementObject queryObj in searcher.Get())
{
if (queryObj["PNPDeviceID"] != null)
{
}
}
Friday, March 9, 2018 9:22 AM
Hi,
I have not find any related information about control key the HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY registry on Internet, would you kindly paste a screen shot here for detail information?
As Microsoft article HKLM\SYSTEM\CurrentControlSet\Enum Registry Tree described about Enum key, it seems there is no changes between Windows 10 and Windows 7 as the article was edited last year.
For finding information about display, we could enter "system information" in Windows Search box and expand "Components" to check for Display.
To get the bitsperpel informaton, please run comlet "Get-WmiObject Win32_DisplayConfiguration | select DeviceName,BitsPerPel,PelsHeight,PelsWidth " in Power Shell as administrator.
To get the resolution information, please run command line "wmic path Win32_VideoController get VideoModeDescription,CurrentVerticalResolution,CurrentHorizontalResolution /format:value" in command prompt.
Bests,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Monday, March 12, 2018 1:51 AM
Hi Guohao,
Would you mind letting me know the result of the suggestions? If you need further assistance, feel free to let me know. I will be more than happy to be of assistance.
Bests,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Wednesday, March 14, 2018 9:51 AM
Hi Guohao,
I have not heard from you for several days, any update for this issue?
If my reply is useful for you, please mark it as an answer to help more customers who have same issue with you.
Bests,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].
Thursday, March 15, 2018 3:04 AM
Hi Joy,
Thanks you for the reply, this issue has been solved.
The registry for active display has been changed from Win7 to Win10. I have used the WMI to get the active monitor, and it works.
Thursday, March 15, 2018 10:18 AM
Hi Guohao,
Thank you for your feedback and sharing.
Your contribution might be very useful for other customers who encounter same issue with you.
Bests,
Please remember to mark the replies as answers if they help.
If you have feedback for TechNet Subscriber Support, contact [email protected].