|
| KiXtart Command Reference |
MESSAGEBOXactionDisplays a standard dialog box in Windows. syntaxMESSAGEBOX ("message", "title", style, time-out) parametersMessage The message to display in the dialog box. Title The title of the dialog box. Style Optional numeric expression that is the sum of values specifying the number and type of buttons to display, the icon style to use, the identity of the default button, and the modality. The following table illustrates the values used and the meaning of each group of values. Buttons to display
Icon to display
Default button
Modality
When adding numbers to create a final value for the argument type, use only one number from each group. If style is omitted, a default value of 0 is assumed. Time-out Optional numeric expression representing the number of seconds after which to close the dialog box. noteThe time-out feature only works if the MESSAGEBOX dialog box is the active window for the duration of the time-out. If the user switches away from KiXtart and activates another application, the MESSAGEBOX dialog box is not closed. remarksMESSAGEBOX displays a maximum of 1024 characters in application-modal dialog boxes. Longer messages are truncated after the 1024th character. Message strings longer than 255 characters with no intervening spaces are truncated after the 255th character. For system-modal dialog boxes, the number of characters you can display depends on screen resolution and number of lines in the message. MESSAGEBOX breaks lines automatically at the right edge of the dialog box. If you want to set line breaks yourself, place a linefeed (ANSI character 10) before the first character of the text that is to begin each new line. returnsThe value returned by MESSAGEBOX indicates which button was selected, as shown in the following table.
If the dialog box contains a Cancel button, pressing esc has the same effect as choosing Cancel. Example$Selection = MessageBox("Do you want to continue ?", "KiXtart", 36) If $Selection = 6 ? "Yes selected, continuing...." Endif OptionalArgument1 Optional string value representing an argument for the method. Note : all optional arguments must be specified as a string. The actual type of the argument is determined automatically based on the corresponding TypeCharacter in TypeList. returnsA string representing the return value of the function. If the call fails, @ERROR will be set to the relevant error code. |