Chances are you are using
System.Windows.Forms.Cursor
. (Again, always, always tag your UI library, like "Forms".)
But it already can be moved, because the property
Position
is a read/write property:
http://msdn.microsoft.com/en-us/library/system.windows.forms.cursor.position.aspx[
^].
Please be advised that using P/Invoke kills platform compatibility of your code. If this is a Windows Forms application, it can be executed on many platforms without recompilation, via Mono. A single P/Invoke method can break this feature at once.
—SA