Displays a dialog box that contains a system icon, a set of buttons, and a brief message, such as status or error information. The message box returns an value that indicates which button the user clicked.

syntaxSyntax:
DlxApp.MessageBox(message, mode = DlxApp.OK)

Parameters

Parameter Description
message The message to be displayed. If the string consists of more than one line, you can separate the lines using a carriage return and/or linefeed character between each line.
mode The contents and behavior of the dialog box. If this parameter is omitted it is equal to OK. This parameter can be a combination of flags from the following groups of flags.

To indicate the buttons displayed in the message box, specify one of the following values:
Value Meaning
DlxApp.ABORTRETRYIGNORE The message box contains three push buttons: Abort, Retry, and Ignore.
DlxApp.CANCELTRYCONTINUE The message box contains three push buttons: Cancel, Try Again, Continue.
DlxApp.OK The message box contains one push button: OK. This is the default.
DlxApp.OKCANCEL The message box contains two push buttons: OK and Cancel.
DlxApp.RETRYCANCEL The message box contains two push buttons: Retry and Cancel.
DlxApp.YESNO The message box contains two push buttons: Yes and No.
DlxApp.YESNOCANCEL The message box contains three push buttons: Yes, No, and Cancel.

To display an icon in the message box, specify one of the following values.
Value Meaning
DlxApp.ICONERROR A stop-sign icon appears in the message box.
DlxApp.ICONWARNING An exclamation-point icon appears in the message box.
DlxApp.ICONINFORMATION An icon consisting of a lowercase letter i in a circle appears in the message box.

To indicate the default button, specify one of the following values.
Value Meaning
DlxApp.DEFBUTTON1 The first button is the default button. DEFBUTTON1 is the default unless DEFBUTTON2 or DEFBUTTON3 is specified.
DlxApp.DEFBUTTON2 The second button is the default button.
DlxApp.DEFBUTTON3 The third button is the default button.

Return Value

If a message box has a Cancel button, the function returns the IDCANCEL value if either the ESC key is pressed or the Cancel button is selected. If the message box has no Cancel button, pressing ESC will no effect - unless an OK button is present. If an OK button is displayed and the user presses ESC, the return value will be IDOK.
If the function fails, the return value is zero. If the function succeeds, the return value is one of the following menu-item values.

Return value Description
DlxApp.IDABORT The Abort button was selected.
DlxApp.IDCANCEL The Cancel button was selected.
DlxApp.IDCONTINUE The Continue button was selected.
DlxApp.IDIGNORE The Ignore button was selected.
DlxApp.IDNO The No button was selected.
DlxApp.IDOK The OK button was selected.
DlxApp.IDRETRY The Retry button was selected.
DlxApp.IDTRYAGAIN The Try Again button was selected.
DlxApp.IDYES The Yes button was selected.

Example

  Copy codeCopy code
if (!DlxApp.OpenJob("Blinker.clxjob"))
{
  DlxApp.MessageBox("An error occurred while opening the job.", DlxApp.OK|DlxApp.ICONERROR);
}

See also