Purpose |
Display a message box containing a text
| ||||||||||||||||||||||||||||||||
Syntax |
lResult& = MSGBOX(txt$ [, [style&], title$]) | ||||||||||||||||||||||||||||||||
Remarks |
The MSGBOX function is comprised of the following elements: | ||||||||||||||||||||||||||||||||
txt$ |
Indicates the text to display within the message box. | ||||||||||||||||||||||||||||||||
style& |
Optional parameter which determines the appearance of the message box. Some styles may be combined (OR'ed together) to specify the button and icon displayed in the message box. If style& is omitted, PowerBASIC substitutes %MB_OK. The following styles are defined in WIN32API.INC, in the form of numeric equates:
| ||||||||||||||||||||||||||||||||
title$ |
Optional title to be displayed in the caption of the message box. If title$ is not specified, "PowerBASIC" is used automatically. | ||||||||||||||||||||||||||||||||
lResult& |
Identifies the Button selected by the user. This will be equal to one of the following equates:
Additional styles may be found in WIN32API.INC in the section prefixed with %MB_. If you are not interested in which button the user selects, use a MSGBOX statement rather than a MSGBOX function. A question mark may be used as an abbreviation for the MSGBOX statement. | ||||||||||||||||||||||||||||||||
Restrictions |
Strings displayed by the MSGBOX function are displayed only up to the first $NUL character, if any. | ||||||||||||||||||||||||||||||||
See also |
|||||||||||||||||||||||||||||||||
Example |
lResult& = MSGBOX("Overwrite registry file?", %MB_OKCANCEL OR %MB_DEFBUTTON2 _ OR %MB_TASKMODAL, "Critical Warning") |