How to move mouse cursor programmatically in Delphi

It's very simple. Just drop TSystemMouse component onto your form and set the Position property to move mouse cursor to any point on the screen. Additional MouseControl and MouseWindow properties allow to position mouse cursor to any control of your application and to any windows by its handle. MoveToControl and MoveToWindow methods allow to move mouse cursor to control or window smoothly.

  TaskBarHandle: HWND;
  with cmpSystemMouse do
    if rgrPositionMode.ItemIndex=0 then MoveToWindow(TaskBarHandle) // smoothly
    else MouseWindow:=TaskBarHandle; // immediately
See also
System Mouse
Components for Delphi / C++ Builder
Howtos for Programmers