Batteries

M

mick

I`m learning C# and wrote a little utility that displays the power level of
my laptop battery. When the level gets below 20% the display flashes and an
alarm will sound.
What is supposed to happen is, when the computer is plugged into the mains
then alarm will stop but the display will will keep flashing until it goes
over 20% again. All was working well until I plugged in and the alarm did`nt
stop. When I checked the battery icon in the bottom right it stated "plugged
in but not charging". As I am checking for BatteryChargeStatus.Charging to
determine whether to sound the alarm this obviously wont now work when in
this `plugged in but not charging` state. How do I check for this?

BatteryChargeStatus only has - Charging, Critical, High, Low,
NoSystemBattery and Unknown.

TIA,
mick
 
S

Scott Seligman

mick said:
in but not charging". As I am checking for BatteryChargeStatus.Charging to
determine whether to sound the alarm this obviously wont now work when in
this `plugged in but not charging` state. How do I check for this?

PowerStatus.PowerLineStatus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

battery issue? 3
Inspiron 1525 6
battery life 8
laptop battery questions 4
Battery recharging problem 12
Looking forward to 2040 5
Re: Laptop battery no longer gets charged 12
Laptop batteries 6

Top