public void GetMove(ref int x, ref int y) { POIN p = new POIN(); if (GetCursorPos(out p))//API方法 { { x = p.X; y = p.Y; } } }
public static extern bool GetCursorPos(out POIN pt);