利用Api函數計算Windows從啟動后所運行的總時間

發表于:2007-07-14來源:作者:點擊數: 標簽:
作者:徐建波

Private Declare Function GetTickCount Lib "kernel32" () As Long

Private Sub Timer1_Timer()
Dim hour As Integer
Dim minute As Integer
Dim second As Integer
hour = GetTickCount 1000 60 60
Label1.Caption = Str(hour) + "小時"

minute = (GetTickCount - hour * 60 * 60 * 1000) 1000 60
Label2.Caption = Str(minute) + "分鐘"

second = (GetTickCount - Val(Label1.Caption) * 60 * 60 * 1000 - Val(Label2.Caption) * 60 * 1000) 1000
Label3.Caption = Str(second) + "秒鐘"
End Sub

原文轉自:http://www.anti-gravitydesign.com

国产97人人超碰caoprom_尤物国产在线一区手机播放_精品国产一区二区三_色天使久久综合给合久久97