Is it possible to detect that a monitor connected to a Windows PC actively displays a specific input?

I am developing a Windows application that supports remote displays via VNC. Typically, remote displays will be the only visual interface. However, there will be times when the user wants to view the application using a physical monitor. If a connected physically connected monitor is connected and switches to a specific input (maybe DVI or HDMI), I should be able to detect this and turn off VNC. Is it possible to determine if an active monitor is actively displaying a specific input?

I know that I can get some information about connected monitors with Screen.AllScreens, but nothing in this is like what I need. Maybe some method open by the Windows API can give me this information? Is it possible to determine the necessary information from VESA / DDC?

+3
source share
1 answer

I have no experience developing a VNC application, but perhaps a suggestion might start you on the right track.

Download wmiexplorer

  • Run the program
  • Here you can explore the different classes in WMI, which will be the lowest level that I think you are going to get
  • Go to the "Request" tab and enter the request: "select * from Win32_DesktopMonitor"

, , . ( , , )

, Win32_DesktopMonitor.

DeviceID Name " ". "Generic PnP Monitor", MonitorManufacturer, , , . Screen , , SystemName, , , .

ManagementObjectSearcher WMI.

Edit

/ , , . , ClassGUID MonitorDesktop PnPEntity.

+2

All Articles