Click x MouseDown

Hello,

I would like to know if there is a way to identify a click or MouseDown event. I am making this question because MouseDown events is trigged before Click in Vb.net, but, MouseDown could be a "drag" event instead of click event. Is there a way to isolate both?

Thank you
jr_barros_jrAsked:
Who is Participating?
 
Fernando SotoRetiredCommented:
From your previous post, "I can't use "GiveFeedback". How can I use it?", the two links show I posted show how to use it.
0
 
karstiemanCommented:
You could start a timer on mousedown and end it on mouseup.
Then, specify that if time was shorter than X ( for expample 10ms) it was a click, and longer ( X > 10ms ) it was a Drag.
0
 
jr_barros_jrAuthor Commented:
Karstieman,

I though to do that, but the problem is that Timer will depends on computer reaches IDLE and it can take more than "click time".

0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
Fernando SotoRetiredCommented:
Hi jr_barros_jr;

From Microsoft documentation: Implementing Drag and Drop in Visual Basic .NET
http://msdn.microsoft.com/en-us/library/aa289508(VS.71).aspx

The above shows how to keep track of the mouse down status.

Fernando
0
 
jr_barros_jrAuthor Commented:
I can't use "GiveFeedback". How can I use it?
0
 
Fernando SotoRetiredCommented:
Hi r_barros_jr;

Control.GiveFeedback Event  - With sample code
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.givefeedback.aspx

Control.DoDragDrop Method   -  With full code sample showing GiveFeedback
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.dodragdrop.aspx

Fernando
0
 
jr_barros_jrAuthor Commented:
Fernando,

It was not exactly what I was looking for.


0
 
jr_barros_jrAuthor Commented:
The solution for my main question was not answered, although I receive other idea.
0
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.

All Courses

From novice to tech pro — start learning today.