01-27-2009 02:04 AM
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.
01-27-2009 03:26 AM
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.
01-27-2009 03:48 AM
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
01-27-2009 05:33 AM - edited 01-27-2009 05:34 AM
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;
}