Share via


MOVE POPUP Command

Moves a user-defined menu created with DEFINE POPUP to a new location.

MOVE POPUP MenuName TO nRow1, nColumn1 | BY nRow2, nColumn2

Parameters

  • MenuName
    Specifies the menu to move.

    In Visual FoxPro, you cannot move the system menu.

  • TO nRow1, nColumn1
    Moves the menu to a location, specified by nRow1, nColumn1, in a user-defined window or in the main Visual FoxPro window.

  • BY nRow2, nColumn2
    Moves the menu to a location relative to its current position. nRow2 specifies the number of rows to move the menu (down if nRow2 is positive, up if negative). The numeric expression nColumn2 specifies the number of columns to move the menu (to the right if nColumn2 is positive, to the left if negative).

Remarks

A menu can be moved to a specific position or relative to its current position. If a menu has been defined, it can be moved; it doesn't have to be active or visible.

Example

The following example defines and activates a menu, then moves and changes its size.

CLOSE DATABASE
CLEAR
DEFINE POPUP popMovIn FROM 2,2 TO 7, 14 PROMPT FILES LIKE *.PRG ;
   TITLE 'Programs'
ACTIVATE POPUP popMovIn NOWAIT
=CHRSAW(2)
MOVE POPUP popMovIn BY 5,5     && Move menu down
=CHRSAW(2)
SIZE POPUP popMovIn BY 5,5     && Enlarge the menu 
=CHRSAW(2)
SIZE POPUP popMovIn BY -5,-5     && Shrink the menu 
=CHRSAW(2)
MOVE POPUP popMovIn BY -5,-5     && Move menu up
=CHRSAW(2)
DEACTIVATE POPUP popMovIn 
RELEASE POPUP popMovIn 

See Also

ACTIVATE POPUP | DEFINE POPUP | SIZE POPUP