<< Click to Display Table of Contents >> Navigation: ThinBASIC Core Language > BuiltIn Functions > General functions > MsgBox |
Description
Creates, displays, and operates a message box. The message box contains a message and title, along with any combination of predefined icons and push buttons. An optional Timeout period can be specified: after the specified period, if no reply from user, a specific timeout message will be returned allowing script to make default/automatic decisions.
Syntax
Result = MSGBOX([hParent,] Message [, Style [, Title [, Timeout [, UpdateCountDown, [, CountDownFormat ] ]] ] ] )
Returns
Number
Parameters
Name |
Type |
Optional |
Meaning |
hParent |
Number |
Yes |
Handle to the owner window of the message box to be created. If this parameter is zero, the message box has no owner window. |
Message |
String |
No |
A string expression that contains the message to be displayed. |
Style |
Number |
Yes |
Specifies the contents and behavior of the dialog box. This parameter can be a combination of flags from the groups of flags specified into module equates. |
Title |
String |
Yes |
A string expression that contains the dialog box title. If this parameter is an empty string, the default title "thinBasic" will be used. |
Timeout |
Number |
Yes |
Number of milliseconds after which the message box will automatically exit with a %IDTIMEOUT return code. |
UpdateCountDown |
Number |
Yes |
Number of milliseconds time window for window caption count down update. If not present, no count down will be shown |
CountDownFormat |
String |
Yes |
Format of the count down. If not present a standard one will be used.
|
Remarks
Restrictions
See also
Examples
DIM RetCode AS LONG
RetCode = MSGBOX(0, "Do you want to procede with deletion?", _
%MB_YESNOCANCEL OR %MB_ICONERROR, _
"Please reply ...")
Select Case RetCode
Case %IDYES
'...
Case %IDNO
'...
Case %IDCANCEL
'...
Case Else
'...
End Select