如何检测鼠标释放
我有一个激活动画的按钮。发布点击时,我想停止动画。我只有这个:
Private Sub AnimationButton_Click()
Call AnimationStart
End Sub
我尝试搜索,但没有找到与按钮有关的任何内容。
I have a button that activates an animation. I want to stop the animation when I release the click. I have just this:
Private Sub AnimationButton_Click()
Call AnimationStart
End Sub
I tried searching, but I didn't find anything related to buttons.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在按钮上的表单上的事件列表中查看
Mouse_down
和MOUSE_UP
的命令按钮。在代码编辑器窗口的顶部,在左侧下拉列表上选择您的命令按钮,可用的事件在右手下拉列表中。
按下按钮时,程序将接收鼠标_Down事件。然后,一个计时器启动,如果在阻力计时器到期之前发布该计时器,您将获得鼠标UP事件,然后进行点击事件。
If you look in the list of events on your form for your button you will find
Mouse_Down
andMouse_Up
for the command button.At the top of the code editor window select your command button on the left hand drop down list and the events available are in the right hand drop down list.
A program will receive a Mouse_Down event when the button is pressed. Then a timer starts and if it's released before the drag timer expires you will get a Mouse Up event followed by a click event.