next up previous contents
Next: fileOpen Up: Methods Previous: Methods   Contents


msgBox

Description

Creates, displays, and operates a message box.


Syntax

Dialogs. msgBox(text[, caption[, type]])


Parameters

text
Specifies the message to be displayed
caption
Optional. Specifies the string used for the dialog box title
type
Optional. Specifies a set of bit flags that determine the contents and behavior of the dialog box . This parameter can be a combination of a button type value and a icon type value shown in the following table.

Button Type
Value Description
0 Show [OK] button
1 Show [OK] and [Cancel] buttons
2 Show [Abort], [Retry] and [Ignore] buttons
3 Show [Yes], [No] and [Cancel] buttons
4 Show [Yes] and [No] buttons
5 Show [Retry] and [Cancel] buttons


Icon Type
Value Description
16 Show Stop Mark icon
32 Show Question Mark icon
48 Show Exclamation Mark icon
64 Show Information Mark icon


Returns

An integer indicates which button of the message box has been clicked.

Value Description
1 [OK] button
2 [Cancel] button
3 [Abort] button
4 [Retry] button
5 [Ignore] button
6 [Yes] button
7 [No] button


Example

Dialogs.msgBox("This is a test", "Test", 17);



next up previous contents
Next: fileOpen Up: Methods Previous: Methods   Contents
Copyright ©2000-2007 Shanghai TopCMM Software Technologies. All Rights Reserved.