Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mouse Position
Message
 
 
To
18/12/2000 16:47:18
Josh Fedke
National Financial Corporation
Milwaukee, Wisconsin, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00454832
Message ID:
00454878
Views:
24
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform