Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Screen coordinates of mouse position?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00258766
Message ID:
00259120
Views:
29
>Is there a way to find the Windows Desktop coordinates of the mouse when the mouse is over a FoxPro screen? I don't want the coordinates within the FoxPro screen or form.

Hi Ivan,

The problem with getting the form's top and left coordinates is that they aren't absolute. They're relative to the VFP desktop. The easiest way to get the absolute coordinates is to first load Foxtools and then
* lccaption is the caption of the form of interest
lnhWnd = _WhTohWnd(_WFindTitl(lccaption))
STORE 0 TO lnTop, lnLeft, lnBottom, lnRight
= _GetWRect(nHwnd, @lnTop, @lnLeft, @lnBottom, @lnRight)
The lnTop and lnLeft values will be the absolute coordinates. From there you'll have to calculate.
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform