vb6.0中如何记录鼠标画线的时间
vb6.0中用鼠标在picturebox里面画了一条直线,如何编写程序记录我画这条线所用的时间呢?...
vb6.0中用鼠标在picturebox里面画了一条直线,如何编写程序记录我画这条线所用的时间呢?
展开
1个回答
展开全部
Dim a As Single
Dim b As Single
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = Timer
Print "a=" & a
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
b = Timer
Print "b=" & b
Print "用时" & Val(b - a) & "秒"
End Sub
Dim b As Single
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
a = Timer
Print "a=" & a
End Sub
Private Sub Picture1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
b = Timer
Print "b=" & b
Print "用时" & Val(b - a) & "秒"
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询