Purpose |
Display and activate a dialog, allowing it to receive user input and messages. Execution of the code continues at the same time as the dialog is displayed. Modeless dialogs require a message pump to be running for the duration of the dialog. |
Syntax |
DIALOG SHOW MODELESS hDlg [[,] CALL callback] [TO lResult&] |
Remarks |
hDlg identifies a dialog created using DIALOG NEW. You can specify a Callback Function for all dialog messages, using the CALL keyword followed by the name of the Callback Function. Once a modeless dialog is displayed, the DIALOG SHOW MODELESS statement completes, and execution of the code continues. At the same time, the dialog can receive messages and process them via the Callback Function. A DIALOG SHOW MODELESS statement is usually followed by a message pump loop. For more information, please refer to the examples under DIALOG DOEVENTS. |
callback |
If specified, dialog messages are routed to the nominated Callback Function. The nominated callback function name must be a CALLBACK FUNCTION or a compile-time Error 547 ("Callback function required") will occur. |
lResult& |
When the modeless dialog is destroyed using the DIALOG END statement, the resulting value is assigned to the lResult& variable, if specified. lResult& is excluded from becoming a Register variable by the compiler, since this value can be assigned from outside of the function containing the DIALOG SHOW MODELESS statement, and this may only be performed with a memory variable. However, if the target variable is explicitly declared as a register variable, PowerBASIC raises a compile-time Error 491 ("Invalid register variable"). |
See also |
Dynamic Dialog Tools, DIALOG DOEVENTS, DIALOG END, DIALOG NEW, DIALOG SHOW MODAL |