hi guys, i have created move mouse! but i need put only in one window
sample:
how i move mouse in the find window location?
hi guys, i have created move mouse! but i need put only in one window
sample:
how i move mouse in the find window location?
Moving the mouse and clicking it?
I'm not entirely sure what you're up to. There are only a few good reasons to do it, like automating tests and such. There are plenty of nefarious reasons to do it.
Be aware that users strongly object to programs that move their mouse. Even jumping the mouse to the OK button on a form is generally too aggressive. As an automation thing it can be okay, but beware of doing it when the user is present.
You've already got the functions correct. SetCursorPos. Since you're in C# you can also use Windows.Forms.Cursor.Position().
Both take a position in SCREEN coordinates. If you're looking for an offset within a window location, there are the ClientToScreen() and ScreenToClient() functions. The C# equivalents are Windows.Forms.Control.PointToScreen() and ...PointToClient() functions.