Using Win32 functions in Visual FoxPro Image Gallery
Cursor
..msdn
ClipCursor
GetClipCursor
GetCursorInfo
GetCursorPos
ShowCursor
Code examples:
Clipping mouse cursor area
Creating a clipping region from the path selected into the device context of a form
Form Magnifier
GDI+: Implementing image scrolling with inertia
Shortcut Menu Class
Tracking mouse movement to detect when to start dragging
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
GetCursorPos
    Add comment     W32 Constants      Translate this page
Retrieves the cursor"s position, in screen coordinates.
Code examples:
GDI+: Implementing image scrolling with inertia
Using FoxTray ActiveX control: System Tray Icon and menu attached to VFP form
Creating a clipping region from the path selected into the device context of a form
Form Magnifier
Shortcut Menu Class
Tracking mouse movement to detect when to start dragging
Clipping mouse cursor area
Declaration:
BOOL GetCursorPos(
  LPPOINT lpPoint   // cursor position
);
FoxPro declaration:
DECLARE SHORT GetCursorPos IN user32 STRING @ lpPoint
Parameters:
lpPoint
[out] Pointer to a POINT structure that receives the screen coordinates of the cursor.
Return value:
If the function succeeds, the return value is nonzero.
My comment:
This function returns an absolute screen position.

Position the cursor with MOUSE AT , ; where x and y are local coordinates of VFP main window. After that read the cursor position with GetCursorPos function. That gives you a difference between local and global coordinates.

Put = INKEY(0.1) or any other delay between setting and reading the cursor position. It seems that without such delay VFP does not have enough time to inform the OS about mouse cursor repositioning.
Word Index links for the GetCursorPos :
Translate this page:
  Spanish    Portuguese    German    French    Italian  
FreeTranslation.com offers instant, free translations of text or web pages.
Created: 2001-07-31 12:00:00
Modified: 2001-11-26 16:02:47
Visited in last 7 days: 58
User Contributed Notes:
There are no notes on this subject.


Copyright 2001-2017 News2News, Inc. Before reproducing or distributing any data from this site please ask for an approval from its owner. Unless otherwise specified, this page is for your personal and non-commercial use. The information on this page is presented AS IS, meaning that you may use it at your own risk. Microsoft Visual FoxPro and Windows are trade marks of Microsoft Corp. All other trademarks are the property of their respective owners. 

Privacy policy
Credits: PHP (4.4.9), an HTML-embedded scripting language, MySQL (5.6.37), the Open Source standard SQL database, AceHTML Freeware Version 4, freeware HTML Editor of choice.   Hosted by Korax Online Inc.
Last Topics Visited (54.224.43.96)
15 sec.Function: 'PathCompactPathEx'
29 sec.Function: 'GdipGetImageType'
46 sec.
Function group: 'Version Information'
1.05 min.Function: 'StrDup'
1.35 min.Function: 'StrToInt'
1.63 min.Function: 'CommandLineToArgvW'
2 min.Function: 'SHGetPathFromIDList'
2.3 min.
Function group: 'File System'
2.62 min.
Function group: 'Dialog Box'
2.95 min.Function: 'FtpCommand'
Google
Advertise here!