With this code, SysPower.BatteryLifePercent returns 0 in nt 4.0.. but it works properly in winxp..Code:Type SYSTEM_POWER_STATUS ACLineStatus As Byte BatteryFlag As Byte BatteryLifePercent As Byte Reserved1 As Byte BatteryLifeTime As Long BatteryFullLifeTime As Long End Type Declare Function GetSystemPowerStatus Lib "kernel32.dll" (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long Dim SysPower As SYSTEM_POWER_STATUS GetSystemPowerStatus SysPower
anyone know how i can get this to work with nt 4.0?
It also works in 9x..




Reply With Quote