Link to home
Start Free TrialLog in
Avatar of LeTay
LeTay

asked on

Check battery status in a Delphi application

Is there a way, in a Delphi application running on a portable PC, to check :
1. The battery charge status
2. If the PC is being charged with power cable
Thanks
Avatar of David Johnson, CD
David Johnson, CD
Flag of Canada image

Define portable device.  Every OS i.e. Windows, Android, IOS have api's that you can use.
Avatar of LeTay
LeTay

ASKER

Hello, what do you mean ?
This is a PC, not a smartphone, so Windows 10
You can use WMI to get battery status. MS WMI Battery info record gives you all you need to know about battery.
ASKER CERTIFIED SOLUTION
Avatar of LeTay
LeTay

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial