Battery Information

  • Thread starter Thread starter david.pope
  • Start date Start date
D

david.pope

I have some sample code on obtaining battery information on a mobile device.

Does anyone know if one can obtain this information using the Smart Device
Framework v1.2? If so, can someone point me to the right namespace?

Thanks,

d
 
You can find the necessary P/Invoke in
OpenNETCF.Win32.Core.GetSystemPowerStatusEx. In the latest code you'll find
an updated version of this to match the desktop v2.0 framework in the
OpenNETCF.Windows.Forms.SystemInformationEx.PowerStatus property.

Also if you want to display the battery state, or be alerted when it reaches
a particular threshold value you can find the BatteryLife and BatteryMonitor
classes in OpenNETCF.Windows.Forms.

Peter
 
Back
Top