
Private Declare Function GetTickCount Lib "kernel32" () As Long
Dim dj As Boolean '判断是否单击
Dim t As Long '记录第一次单击的时间
Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
If dj Then
MsgBox "连续两次单击的时间差:" & Str(GetTickCount - t) & "ms"
dj = False
Else
t = GetTickCount
dj = True
End If
End Sub
试试这个代码,看是否可以?