PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > MENU command
MENU command

Creates an independant customized menu bar.


MENU must be used with the MENUWAIT command.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('MENU')

CHGVAR

VAR(&PARM1) VALUE('Captions="Names of buttons ;…"
[;Tips="Help ballon ;…"]

[;MenuName="Name of the menu"]')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +
&PARM2 &RESULT)

 

 

Parameters

 

Parameters

 

Parm1

Captions : Name of each button of the new menu bar.
Names separator is semicolon (
 ;).

The number of labels determines the number of buttons on the menu bar.


Tips : Allows to display a help balloon for each button. Tips separator is semicolon ( ;).


MenuName: Name of the menu.

 

 

 

Notice

 

Upon MENUWAIT command call, AS/400 program stands by waiting for an user action. It will take over again when the menu will be closed, or upon one of the new menu button action.
The &RESULT variable of the MENUWAIT command, contains the pressed button number on 5 digits (From 1 to n).

 

Example

 

       CHGVAR     VAR(&CMD) VALUE('MENU')                        

       CHGVAR     VAR(&PARM1) +                                  

                    VALUE('CAPTIONS="VALIDER;ANNULER";TIPS="VAL+ 

                    IDER LE DOCUMENT;ANNULER"')                  

       CHGVAR     VAR(&PARM2) VALUE(' ')                         

       CALL       PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +    

                    &PARM2 &RESULT)                              

 

CHGVAR     VAR(&CMD) VALUE('MENU')                      

CHGVAR     VAR(&PARM1) +                                

             VALUE('CAPTIONS="EXCEL;WORD";TIPS="OUVRIR +

             EXCEL;OUVRIR WORD";MENUNAME="CHOIX APPLI + 

             OFFICE"')                                  

CHGVAR     VAR(&PARM2) VALUE(' ')                       

CALL       PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +  

             &PARM2 &RESULT)