Article ID: 105006
Article Last Modified on 9/30/2003
MsgBox(<msg>,<title>,<type>)
Value Meaning
-------------------------------------------------
Number and type of buttons
--------------------------
0 Display OK button only
1 Display OK and Cancel buttons
2 Display Abort, Retry, and Ignore buttons
3 Display Yes, No, and Cancel buttons
4 Display Yes and No buttons
5 Display Retry and Cancel buttons
Icon style
----------
0 Display no icon
16 Display Critical Message icon
32 Display Warning Query icon
48 Display Warning Message icon
64 Display Information Message icon
Default button
--------------
0 First button is default
256 Second button is default
512 Third button is default
The first group of values (1-5) describes the number and type of buttons
displayed in the dialog box; the second group (0, 16, 32, 48, 64) describes
the icon style; and the third group (0, 256, 512) determines which button
is the default. When adding numbers to create a final value for the
argument type, use only one number from each group. The value returned by
the MsgBox() function indicates which button has been chosen, as shown in
the following table:
Value Button chosen
----------------------
1 OK
2 Cancel
3 Abort
4 Retry
5 Ignore
6 Yes
7 No
If the dialog box displays a Cancel button, pressing the ESC key has the
same effect as choosing Cancel.
SET LIBRARY TO SYS(2004)+"FOXTOOLS.FLL" ADDITIVE
msg="Do you want to continue?"
title="User Input Needed"
userchoice=MSGBOX(msg,title,276)
* 276 is created from 4+16+256
* (Display Yes and No Buttons)+(Display Critical Message Icon)
* + (Second Button is Default)
IF userchoice=6
WAIT WINDOW 'User has chosen "YES"'
ELSE
WAIT WINDOW 'User has chosen "NO"'
ENDIF
RELEASE LIBRARY SYS(2004)+"FOXTOOLS.FLL"
Additional query words: FoxWin VFoxWin 2.50 2.50a 2.50b 2.60 2.60a alert
Keywords: kbcode KB105006