ShowMessageBox

This function shows a simple message box with either an OK button or Yes / No buttons.

Function Group Execution Windows Embedded Thin Client
ShowMessageBox Screen Asynchronous Supported Supported Not supported

Syntax

ShowMessageBox(strMessage { | , { optNumButtons | 0 | 4 } { | ,optStrTitle } } )
strMessage
The message body that will be displayed in the box.
optNumButtons
A numeric flag that specifies which kind of confirmation buttons to display in the message box:
Value Description
0 OK button
4 Yes / No buttons
Tip: To add an exclamation mark to the box — to make it an alert or warning rather than a plain message — add 48 (vbExclamation) to this parameter. For more information, see "Examples" below.

This is an optional parameter. If no value is specified, then the default is 0.

optStrTitle
The title of the message.

This is an optional parameter. If no value is specified, then no title will be displayed.

Returned value

This function returns the following possible values:
Value Description
1 Operator clicked OK.
6 Operator clicked Yes.
7 Operator clicked No.

Examples

ShowMessageBox( "The action could not be completed." )
ShowMessageBox( "The action could not be completed.", 0+48, "Alert" )
ShowMessageBox( "Continue with action?", 4 )