#692 – Common Controls Typically Do Not Capture the Mouse

It’s a convention within Windows that controls typically do not capture the mouse after they intercept a mouse down event.  For example, you click on a Button by pressing and releasing the left mouse button.  But if you press the left mouse button, and then move the mouse pointer off the button before releasing, the mouse will not get clicked.

Avoiding a mouse capture in this case allows the user to avoid a click action after inadvertently pressing the left mouse button down over the wrong user interface element.

Advertisement

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

2 Responses to #692 – Common Controls Typically Do Not Capture the Mouse

  1. Pingback: Dew Drop – November 16, 2012 (#1,444) | Alvin Ashcraft's Morning Dew

  2. Stefan says:

    Hello Sean,

    one question about a possible usage of Mouse Capture: Drag Drop..
    As far as I know the left mouse button must be pressed and moved to start the drag.
    (move threshold via SystemParameters.MinimumHorizontalDragDistance, …)

    But if the mouse button will be pressed near to the margin of the drag item (e.g. list box, list box item) and directly moved outside of the item the minimum mouse move will not be detected on the item.

    Now the question:
    Does it make sense to use mouse capture to avoid the problem?
    Is it a good idea to use the mouse capture while the mouse button is pressed to detect the distance?

    If yes, are there disadvantages?

    Best regards,

    stefan

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 )

Twitter picture

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

Facebook photo

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

Connecting to %s

%d bloggers like this: