Friday, June 17, 2011

.NET WinForms - How to listen to events for system LogOff, User Locked, Hibernate Started and System resumed?

I want to listen to events in my windows forms .NET application for the following system wide events :

Log Off Lock Windows Hibernate Started Sleep Started System Resumed

Are these possible?


You need to look WMI (Windows media instrumentation). You would need to create event watchers for the above mentioned events.

Useful links:

How to create a WMI Event Watcher for a user logoff event?

No comments:

Post a Comment