SystemEvents.DisplaySettingsChanged not getting HDMI Arrival/Removal event?

1.2k Views Asked by At

I am trying to track a HDMI monitor connection/removal using the below code. That DisplaySettingChanged event is however not triggered for most of the monitors. A HDMI monitor removal event is not raised most of the times.

Event registration:

 Microsoft.Win32.SystemEvents.DisplaySettingsChanged += SystemEvents_DisplaySettingsChanged;

Method:

private static void SystemEvents_DisplaySettingsChanged(object sender, EventArgs e)
{
    Console.WriteLine("Display settings changed.");
}

For example, using an Acer S240HL monitor I get an event when connecting and disconnecting the monitor via HDMI. But with a Dell SE2216H I get no event when disconnecting the monitor from the HDMI port.

Note: I am using Windows 10 Enterprise 2016 LTSB OS.

0

There are 0 best solutions below