How - or what's the best way - to retrieve the device's current battery level in .NET CF 3.5 on Windows Mobile 5 and 6?
I think you want to use the Microsoft.WindowsMobile.Status namepsace (specifically the SystemState class.
Microsoft.WindowsMobile.Status
SystemState
using Microsoft.WindowsMobile.Status; ... BatteryLevel batteryLevel = SystemState.PowerBatteryStrength; BatteryState batteryState = SystemState.PowerBatteryState;
See this post for the full code sample.
2.1m questions
2.1m answers
60 comments
57.0k users