Search Results

Search found 1 results on 1 pages for 'dsrdakota'.

Page 1/1 | 1 

  • 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 does this always return -1? I currently am using MS .NET 4.0 Client Profile on VB.NET 2010 Express. I unplug the for my laptop and see if it makes a difference and it doesn't. Also tried in plugged in. Help please???

    Read the article

1