Answers for "c# set mous position"

C#
2

c# set mous position

using System.Runtime.InteropServices;

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

    [DllImport("user32.dll")]
    public static extern bool GetCursorPos(out Point pos);


	Point point = new Point();
	GetCursorPos(out point);

	SetCursorPos(1,1);
Posted by: Guest on September-06-2021

C# Answers by Framework

Browse Popular Code Answers by Language