0

I've created my own code for moving windows around, using the following system:

  • mousedown (in a certain area) activates the move

  • track mousemove events to move window with cursor

  • mouseup event completes the move

This works great except in cases where the mouse is moved so fast that the cursor leaves my window, before firing a mousemove event, thus not giving me a chance to move the window in the direction the cursor is moving.

Any solutions to this?

Peter Duniho
  • 68,759
  • 7
  • 102
  • 136
Jamona Mican
  • 1,574
  • 1
  • 23
  • 54

1 Answers1

2

The method you are after is Mouse.Capture.

This answer has some more details on use within WPF.

Community
  • 1
  • 1
Pondidum
  • 11,457
  • 8
  • 50
  • 69