Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How to detect mouse release

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.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

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.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading