Determining Which Mouse Buttons Are Pressed in the
Click Event Handler
e parameter is typed as
EventArgs in the event handler’s signature, it contains a
MouseEventArgs object exposing information about the buttons being pressed when the event handler gets called. The code sample below displays information about the mouse buttons when the user clicks a form:
Some controls like the button control will only raise the
Click event if the left mouse button is pressed and thus won’t reveal this information for clicks with other mouse buttons.