|
|
|
Click here to copy the following block | Private Declare Function GetSystemPowerStatus Lib "kernel32" _ (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long
Private Type SYSTEM_POWER_STATUS ACLineStatus As Byte BatteryFlag As Byte BatteryLifePercent As Byte Reserved1 As Byte BatteryLifeTime As Long BatteryFullLifeTime As Long End Type
Private Function GetBatteryTime(Optional ByVal ResultFormat As Integer) As _ Double Dim SysStatus As SYSTEM_POWER_STATUS GetSystemPowerStatus SysStatus If ResultFormat = 0 Then GetBatteryTime = SysStatus.BatteryLifeTime ElseIf ResultFormat = 1 Then GetBatteryTime = SysStatus.BatteryLifeTime / 60 Else GetBatteryTime = SysStatus.BatteryLifeTime / 3600 End If
End Function |
|
|
|
Submitted By :
Nayan Patel
(Member Since : 5/26/2004 12:23:06 PM)
|
|
|
Job Description :
He is the moderator of this site and currently working as an independent consultant. He works with VB.net/ASP.net, SQL Server and other MS technologies. He is MCSD.net, MCDBA and MCSE. In his free time he likes to watch funny movies and doing oil painting. |
View all (893) submissions by this author
(Birth Date : 7/14/1981 ) |
|
|