use System.Runtime.InteropServices; [DllImport("user32.dll")] static extern bool SetCursorPos(int X, int Y);