Microsoft KB Archive/124362

{| = FIX: SET SYSMENU TO DEFAULT Command in Program Clears Menu =
 * width="100%"|

ID: Q124362

2.60   | 2.50b 2.50c WINDOWS | MACINTOSH kbprg kbbuglist kbfixlist The information in this article applies to:


 * Microsoft FoxPro for Windows, version 2.6
 * Microsoft FoxPro for Macintosh, versions 2.5b and 2.5c

SYMPTOMS
When the SET SYSMENU TO DEFAULT command is executed from a program, it clears any menu previously saved with PUSH MENU. However, if the command is issued from the Command window, the menu is not cleared.

STATUS
Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. This problem was corrected in Microsoft FoxPro version 2.6a for Windows and Microsoft FoxPro version 2.6a for Macintosh.

Steps to Reproduce Problem
1. Create a program that contains the following lines:

SET SYSMENU TO SET SYSMENU AUTOMATIC DEFINE PAD quiter OF _msysmenu PROMPT "Quit" ON SELECTION PAD quiter OF _msysmenu SET SYSMENU TO DEFAULT PUSH MENU _msysmenu SET STEP ON SET SYSMENU TO DEFAULT  && Comment this out and do at Command window POP MENU _msysmenu WAIT WINDOW "Did it restore *Quit* menu?" 2. Run the program. The Trace window comes up and if you step through each line, the menu is not restored. 3. Run the program again. This time instead of stepping through the program execute each line from the Command window. The saved menu is restored. Additional reference words: FoxWin FoxMac2.60 buglist2.60 fixlist2.60a KBCategory: kbprg kbfixlist kbbuglist KBSubcategory: FxprgSet Solution Type : kbfix
 * }