-
December 11th, 2002, 09:19 PM
#1
[VB6] How to get the mouse cursor position in a form
I am a newbie on VB and I would like to write a PhotoHunt game in VB6.0. When player click on the image in the VB form, the program should be able to detect the coordinate of the mouse cursor with respect to the image (i.e. with the upper left coner of the image as the origin)
I know there is a function called GetCursorPos to retrieve the mouse cursor's coordinate. But that coordinates is w.r.t. the whole screen. So,
1)is there another function for getting the cursor's coordinate w.r.t. the image in the form? Or
2)are there functions for getting the form's coordinate and the image's coordinate w.r.t the whole screen?
Thx~
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|