Option Compare Database
Option Explicit
Dim DatTime As Long
Private Declare Function GetTickCount Lib "kernel32" () As Long
Private Sub Form_Timer()
Me.标签2.Caption = Left("精确计时:GetTickCount函数取回开机到现在的毫秒数 ", (Len(Me.标签2.Caption) + 1) Mod (Len("精确计时:GetTickCount函数取回开机到现在的毫秒数 ") + 1))
End Sub
Private Sub 命令3_Click()
DatTime = GetTickCount()
End Sub
Private Sub 命令4_Click()
MsgBox (GetTickCount() - DatTime) / 1000
End Sub