Answers for "c# get mouse position from system32"

C#
2

c# get mouse position from system32

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