Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Screen coordinates of mouse position?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00258766
Message ID:
00259120
Vues:
30
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform