| {\rtf1\ansi\ansicpg1252\deff0\deflang1044{\fonttbl{\f0\fnil\fcharset0 MS Sans Serif;}} \viewkind4\uc1\pard\f0\fs17 'Declarations section: \par Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long \par Private Declare Function SetCursorPos Lib "user32" _ \par (ByVal x As Long, ByVal y As Long) As Long \par Private Type POINTAPI \par x As Long \par y As Long \par End Type \par \par \par To find the X, Y coordinates of the mouse cursor use: \par \par Dim cursorPos As POINTAPI \par GetCursorPos cursorPos \par MsgBox "X=" & cursorPos.x & vbCrLf & "Y=" & cursorPos.y \par \par To move the cursor to the top left hand corner use: \par \par SetCursorPos 0, 0 \par } |
Getting and Setting the Cursors Position |
India web developer web development India | India web development company India ecommerce web developer