advr.hlp (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 Statement Details
  ◄Summary►  ◄Details►  ◄Example►                ◄Contents►  ◄Index►  ◄Back►
──────────────────────────────────────────────────────────────────────────────
 MSGBOX msg$ [,type% [,title$]]
 
 Usage Notes
   ■ No other form events can occur while the MSGBOX dialog is active.
 
   ■ MSGBOX displays a maximum of 1,024 characters. If your message is
     longer, it is truncated after the 1,024th character.
 
   ■ Dialog width is determined by the larger of:
     • Msg$ width (maximum 76)
     • Title$ width (maximum 74)
     • Width necessary to display buttons
 
   ■ MSGBOX truncates lines automatically at the right of the dialog box. To
     set line breaks for multiple line messages, use CHR$(13) (carriage
     return) and CHR$(10) (linefeed character) before the text that begins
     each new line. For example:
 
         Msg$ = "This is the first line of my message"
         Msg$ = Msg$ + CHR$(13) + CHR$(10) + "This is the second line"
         MSGBOX$ Msg$
 
   ■ Because the MSGBOX statement does not return a value, some combinations
     of type% values may not be useful. For example, placing more than one
     button on the message box dialog is meaningless, because you cannot
     determine which one was chosen by the user.
 
   ■ The dialog box is movable but not sizable. It is closable only if the
     message box type contains a Cancel button.