Different ON BAR Behavior in FoxPro for MS-DOS & WindowsID: Q115114 The information in this article applies to:
SUMMARYThe ON BAR command has been enhanced in FoxPro version 2.6 to ensure compatibility with other xBase languages. However, the behavior of this command differs between FoxPro for MS-DOS and FoxPro for Windows.
MORE INFORMATIONIn versions 2.0 and 2.5 of FoxPro, the ON BAR command is used only to activate a second popup when a menu bar is chosen. In version 2.6, this command has been enhanced to execute a procedure upon movement to a menu bar. A new command, ON EXIT BAR, has been added to execute a procedure upon movement from a menu bar. In FoxPro for MS-DOS, the ON BAR command will work with the system menu, _MSYSMENU, or a user-defined menu. In FoxPro for Windows, the ON BAR command will work only with a user-defined menu. The ON BAR command will be ignored in FoxPro for Windows if it is used with the system menu. This behavior is by design. When you are using _MSYSMENU in FoxPro for Windows, Windows is in control of the menu, instead of FoxPro. Altering the behavior of the system menu could cause adverse consequences, including crashing Windows entirely.
Steps to Reproduce BehaviorThe following code example illustrates the different behavior of ON BAR when it is run in FoxPro for Windows and FoxPro for MS-DOS. To quit the program, press F8.
Note that the cursor does not highlight a menu bar until the ON BAR command
has been executed. Likewise, the cursor does not highlight the next menu
bar until the ON EXIT BAR command has been executed.
Additional reference words: FoxDos FoxWin 2.60 KBCategory: kbprg KBSubcategory: FxprgGeneral |
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |