Mouse Up Mouse Down

Posted on 2000-01-10
Medium Priority
Last Modified: 2010-05-02
how do i stop a mousedown procedure when the mouseup is started.
Question by:andichilds
LVL 32

Expert Comment

ID: 2339650
What do you mean?
Can you give an example of what you are trying to do?

Expert Comment

ID: 2339727
why don you try putting a variable for example "pod" in the declaration part on the form, it can be an boolean

Then in the begining of the mousedown procedure put an if like this:

if pod=true then
exit sub
end if

Now in the beginig of the mouseup put pod=true so whe mousedown procedure try to start it will "exit sub", then is up to you where to enable this procedure again just puting pod=false

I hope this helps you...

Accepted Solution

paul_tsekov earned 200 total points
ID: 2339817
So, here is some example code:

' Your Form module:
Option Explicit
Dim Flag as Boolean
Private Function CheckMouseUp() _
as Boolean
End Function
Private Sub Command1_MouseUp()
End Sub
Private Sub Command1_MouseDown()
' Here in this Sub you must put
' the code:
  if CheckMouseUp then Exit Sub
' You should put this row in some
' cycles that take a long time of
' calculation.
' In other words you can put this row
' everywhere in the Sub to check
' whether the Mouse is up, and if    
' it is really up, the MouseDown Sub
' will stop.

End Sub

                Pavel Tsekov
      email : paul_tsekov@yahoo.com    

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question