title: How to detect if windows is going to hibernate or suspend?
body: <p>I am using </p>
  
  <pre><code>SystemEvents.PowerModeChanged += new PowerModeChangedEventHandler(
      SystemEvents_PowerModeChanged
  );
  </code></pre>
  
  <p>to tell when Windows is suspending. But how do I know if it is going into hibernate or suspend?</p>
  
  <p>Is there a .Net or PInvoke method to do this?</p>