Friday, May 24, 2013
 
    Search Web Link
Search Software
    
API Home » Cursor » GetCursorPos

GetCursorPos

Category: Cursor
Hits: 11844 Rating: GetCursorPos  has been rated 2.36 by  1283 users (2.36) votes 1283
Rate: 1-star  2-stars  3-stars  4-stars  5-stars
E-mail this API to friend E-mail this Code to a friend  save Bookmark this VB API Function
API Explanation
GetCursorPos reads the current position of the mouse cursor. The x and y coordinates of the cursor (relative to the screen) are put into the variable passed as lpPoint. The function returns 0 if an error occured or 1 if it is successful.

Parameter Information
Declare Function GetCursorPos Lib "user32.dll" (lpPoint As POINT_TYPE) As Long

lpPoint
Receives the x and y coordinates of the mouse cursor.
Code



' Display the coordinates of the mouse cursor
Dim coord As POINT_TYPE ' receives coordinates of cursor
Dim retval As Long ' return value

retval = GetCursorPos(coord) ' read cursor location
Debug.Print "The mouse is at:"; coord.x; coord.y





HOME | MUSIC | DOWNLOADS |  GAMES | TEST-QUIZZES | SITEMAP | ABOUT | HELP
Copyright © 2000 - 2013 Ex-designz. All rights reserved. Website Developed By Dexter Zafra of Myasp-net.com
Link to us | Advertisement | Contact us | Privacy Policy | Terms of use | Accessibility