Hello, I am using the original source code from
http://www.codeproject.com/KB/cs/globalhook.aspx , so I don't know whether this issue has been successfully resolved since then.
I would like to prevent all mouse movement from occuring while a particular procedure is running.
What I have done to try to prevent mouse movement is this code in my Mouse_MoveExt event:
void Mouse_MoveExt(object sender, MouseEventExtArgs e)
e.Handled = true;
e = null;
This doesn't prevent mouse movement 100%. It makes it more cumbersome to move the mouse, but it still can be moved.
I also tried setting the System.Windows.Forms.Cursor.Clip to a rectangle defined by (Cursor.Position.X, Cursor.Position.Y, 1, 1) but it is still not 100% able to stop the mouse from being moved by hand.
Is there a 100% strong way to stop mouse movement?