MsgBox

<< Click to Display Table of Contents >>

Navigation:  Pascal Script Reference > Message and Input Boxes >

MsgBox

function MsgBox( Text, Caption: string; Flags: integer ): integer
The MsgBox function creates, displays, and operates a message box

 
Parameters
Text: string
string that contains the message to be displayed
Caption: string
string that contains the dialog box title
Flags: integer
Specifies the contents and behavior of the dialog box. 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.

MB_OK
The message box contains one push button: OK. This is the default.
MB_OKCANCEL
The message box contains two push buttons: OK and Cancel.
MB_ABORTRETRYIGNORE
The message box contains three push buttons: Abort, Retry, and Ignore.
MB_YESNOCANCEL
The message box contains three push buttons: Yes, No, and Cancel
MB_YESNO
The message box contains two push buttons: Yes and No.
MB_RETRYCANCEL
The message box contains two push buttons: Retry and Cancel.

To display an icon in the message box, specify one of the following values.
MB_ICONHAND
A stop-sign icon appears in the message box.
MB_ICONQUESTION
A question-mark icon appears in the message box.
MB_ICONEXCLAMATION
An exclamation-point icon appears in the message box.
MB_ICONASTERISK
An icon consisting of a lowercase letter i in a circle appears in the message box.
MB_ICONWARNING
An exclamation-point icon appears in the message box.
MB_ICONERROR
A stop-sign icon appears in the message box.
MB_ICONINFORMATION
An icon consisting of a lowercase letter i in a circle appears in the message box.
MB_ICONSTOP
A stop-sign icon appears in the message box.

Return Value
If the function fails, the return value is zero.
If the function succeeds, the return value is one of the following menu-item values.

IDABORT

Abort button was selected.

IDCANCEL

Cancel button was selected.

IDIGNORE

Ignore button was selected.

IDNO

No button was selected.

IDOK

OK button was selected.

IDRETRY

Retry button was selected.

IDYES

Yes button was selected.