title: C# technique for determining if a computer is operating on battery power?
body: <p>I've found a number of API's that can help determine how much charge (percentages, charge estimates, etc) - mostly in WMI</p>
  
  <p>in my application, I'd like to know if the computer is currently powered by battery,  not the status of the battery.  in short, I'd like special behavior when not plugged in</p>
  
  <p>is there such an API?  I'm happy with a win32 API to pinvoke if needed</p>