How to Right-Click by Using the Keyboard in Visual FoxProLast reviewed: November 29, 1995Article ID: Q140157 |
The information in this article applies to:
SUMMARYThere are several mouse enhancement utilities for the Windows environment that allow the right mouse button to be reassigned to another function, such as a double-click event. While enabling this feature may greatly improve productivity, it also prevents the right mouse button from invoking the context menus found throughout the Visual FoxPro user interface. Although one solution is to purchase a three button mouse and assign the double-click functionality to the middle button, you can avoid this by using the ON KEY LABEL and MOUSE commands. The following command, placed in Vfpstart.prg program or at the beginning of an application defines a specific keyboard combination to mimic a right-click in order to bring up the appropriate menu for each object.
MORE INFORMATIONVisual FoxPro now provides the ability to perform mouse actions programmatically by using the MOUSE command. The desired action is specified by CLICK, DBLCLICK, or DRAG TO clauses while the button to press is indicated by LEFT, MIDDLE, or RIGHT clauses. In this example, the key combination of CTRL+SPACEBAR is used as a surrogate right-click, and the ON KEY LABEL command is initiated within VFPSTART so that it is available throughout the development session.
Step-by-Step Example
|
Additional reference words: 3.00 VFoxWin redefine alternate
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |