home screen

Search



Number Of Result : 0

Result :


Thursday, November 27, 2008

Get the Position of the Cursor


// We need to use unmanaged code
[DllImport("user32.dll")]
// GetCursorPos() makes everything possible
static extern bool GetCursorPos(ref Point lpPoint);


- Sử Dụng

// New point that will be updated by the function with the current coordinates
Point defPnt = new Point();
// Call the function and pass the Point, defPnt
GetCursorPos(ref defPnt);

No comments: