GetPowerInfo(ByRef status, ByRef secs, ByRef pct)
Gets the charging status of the device the program is running on.
status - the charging status of the battery. Look below for the different statuses that can be returned.
secs - the approximate time in seconds until the battery looses its charge.
pct - the percentage of the battery charged.
STATUS
POWERSTATE_UNKNOWN
POWERSTATE_ON_BATTERY
POWERSTATE_NO_BATTERY
POWERSTATE_CHARGING
POWERSTATE_CHARGED
Example:
status=0
secs=0
pct=0
GetPowerInfo(status, secs, pct)