LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

fasten left click event response

Hello!

I'd like to know how can I improve the left click event response when clicking many times rapidly.

I have a picture with a callback that responses when left click is pressed, but when the time between two clicks is small (less than 0.5 seconds) it doesn't work.

The callback code is very small (only assign a value to a variable) and there are not any other events in the project.

What can I do? queueing events?

Thanks in advance. 

0 Kudos
Message 1 of 4
(2,958 Views)

If you click on the mouse fast enough the control issues an EVENT_LEFT_DOUBLE_CLICK instead of a simple EVENT_LEFT_CLICK, so you may want to handle that event in addition to normal left click one.

You may also want to tweak the speed at which a double click is fired instead of a normal click: this parameter should be set in the mouse section of the control panel; be aware though that this setting affects all the system life, not only your application.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 2 of 4
(2,952 Views)

Effectively the problem is that CVI takes a double click event instead of single click . Shortenning the time to take double click in the mouse properties the problem is fixed, but it is not a suitable solution for me. Is there any other solution to disable double click events and force CVI to take always single click?

 

Thanks for your quick response 

0 Kudos
Message 3 of 4
(2,950 Views)

Not that I am aware of, but unless a double click has a special meaning (but I don't think so given how you explain your situation) in the picture control callback you could handle the double click as well as the single one event:

 

switch (event) {

  case EVENT_LEFT_CLICK:

  case EVENT_LEFT_DOUBLE_CLICK:

      // Your code here

      break;

}

Message Edited by Roberto Bozzolo on 01-27-2009 12:34 PM


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 4 of 4
(2,946 Views)