Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mouse Position
Message
 
 
À
18/12/2000 16:47:18
Josh Fedke
National Financial Corporation
Milwaukee, Wisconsin, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Divers
Thread ID:
00454832
Message ID:
00454878
Vues:
26
>Hi All:
>
>Does someone have a function (win32 or otherwise) that will retrieve the mouse position in pixels relative to the whole screen. I've seen the functions for position over ole objects and the function for position within a foxpro window, but I want the position of the mouse when a user clicks on a system tray icon.
In your forms INIT
DECLARE INTEGER GetCursorPos IN Win32API ;
	STRING @ lpPoint
ThisForm.Timer1.Interval = 500
and in a timers timer event add
This.Interval = 0
cBuffer = SPACE(8)
iResult = GetCursorPos( @cBuffer )
xCoord = ASC( cBuffer ) + ( ASC( SUBSTR( cBuffer, 2, 1 )) * 256 )
yCoord = ASC( SUBSTR( cBuffer, 5, 1 )) + ( ASC( SUBSTR( cBuffer, 6, 1 )) * 256 )
wait wind transform( xCoord ) + " " + transform( yCoord ) nowait noclear
this.interval = 250
Hope this helps.
censored.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform