Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to convert xyCoord to pixels
Message
 
To
02/12/2003 10:09:30
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00855006
Message ID:
00855040
Views:
18
This message has been marked as a message which has helped to the initial question of the thread.
>Hi all,
>
>Is there a function that converts the nXCoord, nYCoord parameter values of MouseUp() event to pixels or foxcels relative to the _screen area?
>
>TIA.

You don't really need a function for that.

From Help:

nXCoord, nYCoord
Contains the current horizontal (nXCoord) and vertical (nYCoord) position of the mouse pointer within the form. These coordinates are always expressed in terms of the form's coordinate system in the unit of measurement specified by the ScaleMode property of the form.



The default value for ScaleMode is 3 - pixels. So, you will just need to add Form.Left or Form.Top to your coordinates to get the corresponding position relative to _screen.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro

"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison
Previous
Reply
Map
View

Click here to load this message in the networking platform