#656 – Data Available to Mouse Button Event Handlers

The various mouse button events that fire when a mouse button is pressed or released all provide data to the event handler as part of a MouseButtonEventArgs object.  The information contained in this object and available to button press event handlers is listed below.

  • LeftButton – Current state of left button (Released | Pressed)
  • MiddleButton – Current state of middle button (Released | Pressed)
  • RightButton – Current state of right button (Released | Pressed)
  • ButtonState – Current state of whichever button triggered the event (Released | Pressed)
  • ChangedButton – Which button triggered the event?  (Left | Middle | Right | XButton1 | XButton2)
  • ClickCount – # of times button was clicked (events will fire multiple times)
  • MouseDevice – Access to a MouseDevice object, which allows getting general information about the mouse position or mouse buttons
Advertisement

About Sean
Software developer in the Twin Cities area, passionate about software development and sailing.

One Response to #656 – Data Available to Mouse Button Event Handlers

  1. Pingback: Dew Drop – September 27, 2012 (#1,410) | Alvin Ashcraft's Morning Dew

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: