Microsoft KB Archive/128537

{| = Sample Menu with BROWSE, AND SET DEFAULT =
 * width="100%"|

ID: Q128537

The information in this article applies to:


 * Microsoft FoxPro for Windows, versions 2.5, 2.5a, 2.5b, 2.6, 2.6a

SUMMARY
This article shows by example how to create a menu that has an option to perform the SET DEFAULT command and an additional option to perform the BROWSE command so that the BROWSE is executed instead of the default BROWSE LAST command. The example below shows how to do this.

MORE INFORMATION
1. Create a quick menu:

a. From the File menu, choose New. Then choose Menu, and click OK. b. In the Menu dialog, select the Quick Menu option. 2. Create a menu item under File with this prompt: Set Default 3. Choose Command, and type: SET DEFAULT TO GETDIR 4. Change the prompt under Database labeled BROWSE to: BROWSE LAST 5. Create a separate menu item under Database labeled: BROWSE 6. Choose Command and type: BROWSE 7. Save the menu. 8. From the Program menu, choose Generate, and name it MYMENU.MPR.

9. Add the following line to the CONFIG.FPW file:

COMMAND=DO MYMENU.MPR 10. Exit, and restart FoxPro. The new menu should be running. 11. To return to the default FoxPro menu, issue the following command from

the Command window:

SET SYSMENU TO DEFAULT WARNING: If you are creating .EXE files and running them from outside FoxPro, this menu could cause the application to flash up on the screen, and just go away if the same CONFIG.FPW is being used for multiple applications. Remark out the following line or make sure another CONFIG.FPW file is being used by the other .EXE files: COMMAND=DO MYMENU.MPR