如何检测鼠标释放

发布于 2025-01-26 23:19:20 字数 161 浏览 3 评论 0原文

我有一个激活动画的按钮。发布点击时,我想停止动画。我只有这个:

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迎风吟唱 2025-02-02 23:19:20

如果您在按钮上的表单上的事件列表中查看Mouse_downMOUSE_UP的命令按钮。

在代码编辑器窗口的顶部,在左侧下拉列表上选择您的命令按钮,可用的事件在右手下拉列表中。

按下按钮时,程序将接收鼠标_Down事件。然后,一个计时器启动,如果在阻力计时器到期之前发布该计时器,您将获得鼠标UP事件,然后进行点击事件。

If you look in the list of events on your form for your button you will find Mouse_Down and Mouse_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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文