Hacker’s Guide to Visual FoxPro
An irreverent look at how Visual FoxPro really works. Tells you the inside scoop on every command, function, property, event and method of Visual FoxPro.
SET SYSMENU
This command (actually, it’s more like a collection of commands) lets you make changes to the system menu. There are a surprising number of alternatives.
SET SYSMENU ON | OFF | AUTOMATIC
SET SYSMENU [ TO PadList | PopupList | DEFAULT ]
[ SAVE | NOSAVE ]
We’ve divided the command into two parts. ON and OFF are pretty much obsolete in a Windows application—they work, but you wouldn’t want to use them. Just leave SYSMENU set to AUTOMATIC.
SET SYSMENU
TO has some interesting things going on. The setting we use the most is DEFAULT to restore the regular menu when we’ve changed it somehow. Any app that runs in the interactive version of VFP and installs its own menu should be sure to SET SYSMENU
TO DEFAULT on the way out.
You can also specify that the menu should be composed of specific system pads or popups. You can look up the names of system pads and popups in Help or by parsing SYS(2013). SET SYSMENU
TO by itself empties the menu. From the Command Window, it’s pretty funny though, because no sooner have you removed everything than the Format menu pops up, because it’s always available when you’re in an editing window (like the Command Window).
Perhaps you have certain items you always add to the menu and/or others you always remove. It gets pretty tedious having to fiddle every time you SET SYSMENU TO DEFAULT. So don't. Instead, set up the menu the way you want it, then issue SET SYSMENU SAVE. From then on, SET SYSMENU TO DEFAULT restores the menu the way you modified it, not to the bare-bones VFP menu. |
Tired of your changed menu? SET SYSMENU
NOSAVE and you’re back to basics. One warning: In the Professional edition of VFP 3, if you use the default Config.FPW, which calls VFPStart.PRG, VFP adds the Class Browser to the Tools menu on the way in. SET SYSMENU
NOSAVE removes that bar. No such add-ins come with later versions.
* Generated menus begin with:
SET SYSMENU TO
SET SYSMENU AUTOMATIC