Click here to Skip to main content
15,889,595 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How actually can i create realtime battery capacity ?

What I have tried:

PowerStatus ps = SystemInformation.PowerStatus;
int b = (int)(p.BatteryLifePercent * 100);
bunifuCircleProgressbar4.Value = (int)(ps.BatteryLifePercent * 100);
Posted
Updated 6-Aug-17 6:12am
v2
Comments
Richard MacCutchan 6-Aug-17 11:55am    
What does that mean?

 
Share this answer
 
Use WMI and the Win32_Battery class;

Win32_Battery class (Windows)[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900