Batteries

  • Thread starter Thread starter mick
  • Start date Start date
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
 
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
 
Back
Top