How can I know when Windows is going into/out of sleep or Hibernate mode?

Microsoft.Win32.SystemEvents.PowerModeChanged event will give you this information. This event is available in all variants of the .NET framework released by Microsoft so far.

Leave a Comment