qck.hlp (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
MSGBOX Function
  Summary  Details  Example                Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
 Displays a message in a dialog box, waits for the user to choose a button,
 and returns a value indicating which button the user chose.
 
    MSGBOX(msg$ [,type% [,title$]])
 
    ■ msg$     String expression to display in message area of dialog box
 
    ■ type%    Sum of the values that describe the number and type of buttons
               to display; also identifies the default button:
 
               Value   Button Display
               ═════   ═════════════════════════════════════════════════════
               0       (Default) OK
               1       OK, Cancel
               2       Abort, Retry, Ignore
               3       Yes, No, Cancel
               4       Yes, No
               5       Retry, Cancel
               0       First button is default
               256     Second button is default
               512     Third button is default
 
    ■ title$   String expression to display in title bar of dialog box;
               if omitted, no title is displayed
 
    ■ The return value of MSGBOX indicates which button was pressed. If
      MSGBOX has a Cancel button, pressing the Esc key is the same as
      pressing the Cancel button. The return values for MSGBOX are:
 
               Value    Button Pressed
               ═════    ════════════════════════════════════════════════════
               1        OK
               2        Cancel (or Esc)
               3        Abort
               4        Retry
               5        Ignore
               6        Yes
               7        No
 
 See Also
    INPUTBOX$ Function               MSGBOX Statement