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

Displays a message box on the Windows station.

 

Not available when Launcher is running as a Windows service.

 

 

Syntax

CHGVAR

VAR(&CMD) VALUE('MSGBOX')

CHGVAR

VAR(&PARM1) VALUE('

Text="Message text";

Caption="Window title"

')

CHGVAR

VAR(&PARM2) VALUE('

Type=Button type

[;Default=Button Number]

')

CALL

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

 

Parameters

 

Parameters

 

Parm1

Parm1 contains the title and the text to display in the message box :
Text = Text in the message box.

Caption = Title of the window.

Parm2

 

 

 

 

 

 

 

 

 

 

 

RESULT

Parm2 contains options of the message box.

Type=type of message box.
It can be one of the following values:
MB_ABORTRETRYIGNORE, MB_OK, MB_OKCANCEL, MB_RETRYCANCEL, MB_YESNO, MB_YESNOCANCEL.

One of the following values can be added (with the + sign) to display an icon in the message box:
MB_ICONEXCLAMATION, MB_ICONWARNING, MB_ICONINFORMATION, MB_ICONASTERISK, MB_ICONQUESTION, MB_ICONSTOP, MB_ICONERROR, MB_ICONHAND

Default=Button number to make active as default. Optional.

 


Contains the number of the button clicked by the user.

 

 

 

Example

 

This example shows how to make a message box, with buttons Yes and No, with the Exclamation mark icon.

 

CHGVAR

VAR(&CMD) VALUE('MSGBOX')

CHGVAR

VAR(&PARM1) VALUE('Text="Customer not found %LF%
Do you want to continue ?";Caption="Customer Service Application"')

CHGVAR

VAR(&PARM2) VALUE('Type= MB_ICONEXCLAMATION+
MB_YESNO')

CALL

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

 

Note

 

%LF% : Inserts a paragraph break in the text to be displayed.