A: Note: Using ClientToScreen() makes it so that the XY coordinates are relative to the window rather than the whole screen.
procedure PlaceMouse(x, y: word);
var
tp: TPoint;
begin
tp := ClientToScreen(point(x, y));
SetCursorPos(tp.x, tp.y);
end;