9.146 MESSAGE_BOX_SHOW
Note: Built-In Function Rules Usage Options
Causes a standard MS Windows message box to be displayed. It then waits until the user clicks one of a specified set of buttons in the message box before returning control to the application.
Arguments
|
Return Values
|
Technical Notes
-
The message assembly area is cleared at completion of this Built-In Function.
-
If invoked in an appropriate environment (eg: batch task, non-Windows environment) no message window is displayed and the default button value is returned. The value returned is the default value specified in argument 2.
-
You should ensure that the default button, when specified, is valid and appropriate for all situations.
Examples
Present the simplest possible message box:
USE BUILTIN(MESSAGE_BOX_SHOW)
Present a message box enabling the OK and Cancel buttons (with Cancel as the default), title "HELLO", the question icon and text "Do you want to do your backups now?".
USE BUILTIN(MESSAGE_BOX_SHOW) WITH_ARGS(OKCANCEL CANCEL QUESTION HELLO 'Do you want to do your backups now?') to_get(#std_codel)
if '#std_codel *eq CANCEL'
Return
endif
Format some details of an employee into the message box assembly area as individual lines and then display them with just an OK button.
use message_box_add ('Employee Number:' #empno)
use message_box_add ('Name:' #givename #surname)
use message_box_add ('Department:' #deptment)
use message_box_add ('Section:' #section)
use message_box_add ('Salary:' #salary '(monthly =' #mnthsal ')' )
use message_box_show