>This is code in Visual Basic, but with the litle hack about POINTAPI structure, you should can use this code. How to simulate structures in Visual FoxPro, I found at this forum before about a year and a half. Author of documentation and code was Christof Lange. If You can't find this source, let me know, I can e-mail to You this source.
>
>
>'Function Call declaration for GetCursorPos
>Private Declare Function GetCursorPos Lib "user32" _
> (lpPoint As POINTAPI) _
>As Long
>
>'Structure definitions for POINTAPI
>Private Type POINTAPI
> X As Long
> Y As Long
>End Type
>
>If You have installed some version of Microsoft MSDN, You will be able to find more about this function.
>
>I Use this often in Visual Basic, but I never try it in Visual FoxPro.
>I Hope that this will be helpful.
Using CLSHEAP's UDFs:
DECLARE GetCursorPos IN USER32 STRING @ lpPoint
lpPoint = REPL(CHR(0),8)
=GetCursorPos(@lpPoint)
SET PROCEDURE TO CLSHEAP ADDITIVE
nX = DWORDToNum(lpPoint)
nY = DWORDToNum(RIGHT(lpPoint,4))