Subscribing to system events in C# with P/Invoke in Mono

512 Views Asked by At

I have an application in which I need to respond to events such as a user change in the system time (like the Microsoft.Win32.SystemEvents.TimeChanged event), the changing of display settings (SystemEvents.DisplaySettingsChanging and SystemEvents.DisplaySettingsChanged) and the resuming from sleep or hibernate (SystemEvents.PowerModeChanged. The problem is, in my application, the SystemEvents class is not available. So, I was wondering if there is a P/Invoke / WinAPI way of accomplishing the same thing (which I'm sure there is).

0

There are 0 best solutions below