Picking up mouse right button 
Author Message
 Picking up mouse right button

I have this function.  (see below). I can not convert the EventArguent.

I was wondering how do I detect if the right mouse button was pressed or not

Private Sub TreeStruct_Click(ByVal sender As Object, ByVal e As EventArgs)
Handles TreeStruct.Click

    Dim mea As System.Windows.Forms.MouseEventArgs = e

    if(mea = MouseButton.Right)


    end if

end sub

Sun, 26 Dec 2004 10:15:05 GMT  
 Picking up mouse right button
Dear Scott,

EventArgs is the base class for all event arguments. Any other event
argument class subclasses eventargs and so does MouseEventArgs. You
NEVER can cast from a base class to a subclass!

Try to handle the MouseDown event. The MouseDown event should be posted
prior to the Click event. After that, the MouseUp event occurs (search
NET SDK Documentation for "click events raising order"). Normally the
Click event should not be raised, when you right-click a control. But I
might be wrong on that.

Kind regards,

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Sun, 26 Dec 2004 18:20:07 GMT  
 [ 2 post ] 

 Relevant Pages 

1. How do I disable the right mouse button over the webbrowser control ?How do I disable the right mouse button over the webbrowser control ?

2. Here's One For You....Right Mouse Button Problems

3. disable the right mouse button when a form is running

4. Right Mouse Button

5. Override Right mouse button?

6. Right Mouse Button

7. right-mouse button disable?

8. Cancelling a Right Mouse Button Click

9. Right Mouse Button/Grid

10. Right Mouse Button/Grid

11. DBGRID: How can I disable the right mouse button

12. Disable Popup when Right Mouse Button Pressed


Powered by phpBB® Forum Software