vb如何实现按键时间的计算而且控制按键时间的长短
发布网友
发布时间:2024-10-02 15:08
我来回答
共2个回答
热心网友
时间:2024-11-06 05:02
一楼还是复杂啦,来个更简单的嘿嘿O(∩_∩)O~~~~
就一个按键
Dim
mytime
As
Single
Private
Sub
Command1_MouseDown(Button
As
Integer,
Shift
As
Integer,
X
As
Single,
Y
As
Single)
mytime
=
Timer
End
Sub
Private
Sub
Command1_MouseUp(Button
As
Integer,
Shift
As
Integer,
X
As
Single,
Y
As
Single)
Print
"本次按住时间为:"
&
Timer
-
mytime
End
Sub
热心网友
时间:2024-11-06 05:08
比较容易,button
down
这个事件中,启动timer
控件,button
up
关闭timer
控件,返回时间,这就OK了。