MESSAGEBOX
|
Syntax: |
MESSAGEBOX([<WAIT|NOWAIT>,<Exit
Macro>],<Header>,<Text>,<Button
Texts>,<Button Types>,<Separator>,<Image
Name>,<Position of Image>,<Default Value>,<Font
Style>,<Font Height>,<Button Height>,<Button
Width>,<ESC Allowed>[,<Foreground
Red>,<Foreground Green>,<Foreground Blue>[,<Background Red>,<Background
Green>,<Background Blue>]])
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Meaning: |
Creates a dialog with message text and
buttons. The instruction WINDOWPOS defines the position of the window. MESSAGEBOX returns the following values: 0: ESC has been pressed 1: Button No. 1 has been pressed 2: Button No. 2 has been pressed … Handle with NOWAIT -1: Internal error -99: No active window found With NOWAIT the message window is shown, the
function is terminated immediately and returns the identification number
(Handle) of the message box. The instruction CLOSE_MESSAGEBOX can close a message box that has been opened with NOWAIT. The macro
<Exit Macro> is executed after the MESSAGEBOX has been finished. The
variable EBUS_TRANSFER then contains the return code. With WAIT MESSAGEBOX is started
hierarchically and the function only is terminated only after the MESSAGEBOX
has been closed. The parameters <Foreground
Red>,<Foreground Green> and <Foreground Blue> defines the
color with which the <Text> is shown in the window. If these parameters
are missing, the text is shown in black (0,0,0). The parameters <Background
Red>,<Background Green> and <Background Blue> define the
background color of the window. If these parameters are missing or if one of
them has a value < 0, the window is displayed in the standard color. |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Parameter: |
|
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Sample: |
WINDOWPOS(0,0) H% = MESSAGEBOX( "Delete", /* Header "Delete data record
?", /* Text "&Yes;&No;&Cancel", /* Button Texts "1;2;@cancel.jpg", /* Button Types ";", /* Separator "stop.gif", /* Image Name 0, /* Image left 2, /* Default 'No' 2, /* Font Style bold 1.1, /* Font Height 1.5, /* Button Height 12, /* Button Width 0, /* ESC not allowed 255,0,0, /* Text color red 255,255,255) /* Background color white IF H% = 1 THEN ... /* Yes has been selected ENDIF |
||||||||||||||||||||||||||||||||||||||||||||||||||||
|
See also: |
|