SystemInformation.PowerStatus.BatteryLifeRemaining returns -1?
- by dsrdakota
In my code I have:
Dim ps as PowerStatus = SystemInformation.PowerStatus
Dim batteryTimeLeft as Integer = ps.BatteryLifeRemaining 'I have a problem here
MsgBox("Time left on battery: " & cstr(batteryTimeLeft),vbInformation,"Info")
PowerStatus.BatteryLifeRemaining always returns -1 when I have a battery present and used or when not used. Why…