How Menu Events Are Handled by Windows & Macintosh

Last reviewed: October 24, 1995
Article ID: Q103600
The information in this article applies to:
  • Microsoft Visual FoxPro for Windows, version 3.0
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6x
  • Microsoft FoxPro for Windows, versions 2.5x, 2.6a

When a menu popup is active, the operating environment's (Windows or Macintosh) event manager handles all events. This means that FoxPro will not be able to "see" certain events, such as ON KEY LABEL commands, so some code transported from FoxPro for MS-DOS may no longer work. For example, the following procedure will cause a wait window to display in FoxPro for MS-DOS but not in FoxPro for Windows:

  1. From the Command window, issue the follow command:

          ON KEY LABEL F8 WAIT WINDOW "Hello"
    

  2. Click any menu pad and leave the menu popup in the open state.

  3. When you press F8, the wait window will not appear in FoxPro for Windows because the key press was intercepted by the Windows event manager, not by FoxPro for Windows.

Note that the same behavior occurs for user-defined menus; it is not restricted only to the system menu.

NOTE: This behavior occurs in FoxPro for Macintosh when a menu popup is opened by using the shortcut key combination, for example pressing COMMAND+N to open the File, New menu dialog box.


Additional reference words: FoxWin VFoxWin FoxMac 2.50 2.50a 2.50b 2.50c
2.60 2.60a 3.00 access key hot key
KBCategory: kbprg
KBSubcategory: FxtoolGeneral


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 24, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.