Logo

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.

HIDE MENU, SHOW MENU, HIDE POPUP, SHOW POPUP, MOVE POPUP, SIZE POPUP

These commands date back before the Windows menu revolution, when you could set your own standards for how the menus and popups in your application behaved. In those days, it was okay to have menus disappear and reappear and to move popups around on the screen. These days, we don’t do that—it violates the Window interface guidelines and, more important, confuses the heck out of users.

Usage

HIDE MENU MenuList | ALL [ SAVE ]
SHOW MENU MenuList | ALL [ PAD PadName ] [ SAVE ]
HIDE POPUP PopupList | ALL [ SAVE ]
SHOW POPUP PopupList | ALL [ SAVE ]

The SAVE clause in each command leaves an image of the thing around so the user thinks it’s still there. But the image is brain-dead—it just takes up real estate.

These commands have no place in a Windows application.

Usage

MOVE POPUP PopupName TO nRow, nCol | BY nRows, nCols
SIZE POPUP PopupName TO nRows, nCols | BY nRows, nCols

These commands, which can take absolute values (with TO) or relative values (with BY), might have some place in Visual FoxPro applications. Since popups are the key to right-click menus, there are cases where you might want to move or resize a popup dynamically.

Example

* Make popup wider and shorter
SIZE POPUP MyPopup BY 5,-10

See Also

Define Menu, Define Popup, Menus