Get the Cursor Position
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern bool GetCursorPos(ref Point lpPoint);
Point defPnt = new Point();
GetCursorPos(ref defPnt);
string CoordinatesXnY = "X =
" + defPnt.X.ToString() + "Y = " +
defPnt.Y.ToString();
Comments
Post a Comment