It depends on how you have implemented it.
I used this technique and to me it worked fine.
If you wish, post a very simplified and working sample of your
code showing the problem, I will be happy to take a look at it...
-T
Charlie Brown ha scritto:
I gave that one a shot, it just makes the mouse jump all over the
place.
to**************@uniroma1.it wrote:
Charlie Brown ha scritto:
I have written some custom controls that can dragged around a container
control. When the controls reach the edges of the container control,
they stop moving. The mouse continues to travel beyond the border of
the control. When the mouse direction of travel changes, the control
then moves accordingly (I tie the movement of the control to the
MousePosition delta). Is there some way to magnet the cursor to the
control, so when the control stops moving the mouse does the same?
The most obvious way seems to keep track of the mouse position
under MouseMove and, when you need to freeze it, just:
Windows.Forms.Cursor.Position = PreviousPosition