Click x MouseDown

Posted on 2009-05-17
Last Modified: 2012-05-07

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, but, MouseDown could be a "drag" event instead of click event. Is there a way to isolate both?

Thank you
Question by:jr_barros_jr
  • 4
  • 3

Expert Comment

ID: 24405883
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.

Author Comment

ID: 24405908

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".

LVL 62

Expert Comment

by:Fernando Soto
ID: 24406517
Hi jr_barros_jr;

From Microsoft documentation: Implementing Drag and Drop in Visual Basic .NET

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


Author Comment

ID: 24406616
I can't use "GiveFeedback". How can I use it?
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

LVL 62

Expert Comment

by:Fernando Soto
ID: 24406698
Hi r_barros_jr;

Control.GiveFeedback Event  - With sample code

Control.DoDragDrop Method   -  With full code sample showing GiveFeedback


Author Comment

ID: 24416703

It was not exactly what I was looking for.

LVL 62

Accepted Solution

Fernando Soto earned 500 total points
ID: 24418051
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.

Author Closing Comment

ID: 31582345
The solution for my main question was not answered, although I receive other idea.

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
How to connect to a remote mysql server using C#? 9 43
.NET Error 7 42
How do I bind the results to a grid 3 24
Expando 4 35
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

759 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now