用VB怎样计算已开机的时间?

来源:百度知道 编辑:UC知道 时间:2024/06/06 05:31:42

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

Private Sub Form_Load()
Dim lTime As Long
lTime = GetTickCount
MsgBox "系统已经运行了" & lTime & "毫秒"
End Sub

'剩下的就是换算时间了。

GetTick()