Detect left vs. right click event 
Author Message
 Detect left vs. right click event
How do I tell whether a click on a control is a left-click or a right-click?
I need to be able to tell this within the click handler (which I already
have working)...

  /== Peteroid ==\



Thu, 27 Jan 2005 04:59:36 GMT  
 Detect left vs. right click event
Figured this one out. First, one must put the code in the MouseDown event
for the Control (Click won't work). Then look at the MouseButton property of
Control. This returns an enum which is itself called MouseButtons. The
values are bitwise or'ed and include Left, Right, Middle, etc.

  /== Peteroid ==\


Quote:
> How do I tell whether a click on a control is a left-click or a
right-click?
> I need to be able to tell this within the click handler (which I already
> have working)...

>   /== Peteroid ==\



Sat, 29 Jan 2005 01:06:03 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Right Click vs. Left

2. Right Click in ListBox (or overiding left).

3. CListCtrl left mouse click event handler

4. Detect right click on CHeaderCtrl

5. problems detecting a right-click even on a rich edit control

6. (Q) Detecting right click in a CListBox

7. How to detect Right Click

8. Help: Detect when right button is clicked above a button

9. Detecting right click over dialog button.

10. Right-click event on an object of MenuItem

11. override X click-event in top right?

12. Right Click Event

 

 
Powered by phpBB® Forum Software