The information in this article applies to:
SUMMARYYou can reposition the mouse pointer (cursor) by using the Windows API function SetCursorPos(). This function is documented on page 833 of the Windows SDK Programmer's Reference, Volume 2: Functions manual. MORE INFORMATIONThe SetCursorPos() function sets the position, in screen coordinates, of the mouse pointer. Here's the function syntax:
Here x and y are integers; x is the horizontal position and y is the
vertical position. The function is void, so it does not return any value.
Below are code examples for Visual FoxPro using the DECLARE command, and FoxPro 2.x using FOXTOOLS.FLL, that demonstrate how to move the mouse pointer to position 20,20. NOTE: For backward compatibility, Visual FoxPro still supports FOXTOOLS.FLL (included in earlier FoxPro versions), the Visual FoxPro API library that allows calls to 16-bit .DLL functions. However, in Visual FoxPro, the DECLARE command is the preferred method for calling .DLL functions. Visual FoxPro Example Using DECLARE
FoxPro 2.x Example Using FOXTOOLS.FLL
Additional query words: VFoxWin FoxWin
Keywords : kbcode FxprgFoxtools |
Last Reviewed: August 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |