Hi Thom,
Thanks for your feedback.
Based on my understanding, I think you do not want the single click logic
when double click occurs.
==============================
Actually, in windows system, all events are driven by messages. For mouse
events, if you double click your mouse, the single click message will first
occur for you.
This is by design. Because double click is consistute of 2 single click,
which click internal is less than certain value. When the first single
click occurs, the system can not know if it is a "pure" single click or is
just a "part" of double click. So system also will fire single click for
you.
For your request, the only workaround I can think of is delay the single
click code logic. That is: when single click occurs, we can delay a certain
time, to see if another single click is comming, if it comes, we discard
the single click code, but process the double click logic. But if there is
no another single click occurs, we can just process the single click logic.
The key point is to determine the "certain" time to delay. This time should
be a little longer than the system double click time.(Which is stored in
windows system, you can configure it through control panel). In C#, we can
P/invoke GetDoubleClickTime Win32 API to get this value. Then you can use
Timer control to do the delay.
==============================
Please apply my suggestion above and let me know if it helps resolve your
problem.
Thank you for your patience and cooperation. If you have any questions or
concerns, please feel free to post it in the group. I am standing by to be
of assistance.
Best regards,
Jeffrey Tan
Microsoft Online Partner Support
Get Secure! -
www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.