[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] |
Displays the task dialog and captures the modal result value.
Source position: dialogs.pp line 799
public function TCustomTaskDialog.Execute: Boolean; dynamic; overload; |
ParentWnd: HWND |
):Boolean; dynamic; overload; |
True if a valid button identifier was selected in the dialog.
ParentWnd |
|
Parent window handle used to position the dialog in the LCLTaskDialog wrapper. |
Execute is an overloaded Boolean function used to display the dialog and capture the value for the ModalResult property. The parameterless variant is normally called to display and execute the dialog form. It gets the handle for the active form which is used as the parent for the task dialog form from the Screen singleton. If a TCustomForm has not been assigned in Screen, the unassigned handle value (0) is used. The overloaded variant is called using the handle value as an argument.
Execute calls the DoExecute method to perform actions needed to initialize and display the dialog form. It also processes return values used in properties like ModalResult, QueryResult, QueryItemIndex, Button, and RadioButton.
The return value is True if the dialog was successfully displayed and a valid button identifier was clicked to close the dialog - including when Esc, Alt+F4 or the Cancel button is used.
Remark: | This behavior is different than other LCL dialogs where a ModalResult of mrCancel would cause Execute / DoExecute to return False. This is consistent with the task dialog behavior in the Delphi VCL; the Delphi documentation states otherwise but it is incorrect. |
|
Performs actions to configure and execute the dialog. |
|
|
Modal result value returned when the Task dialog was executed. |
|
|
Not used in the current LCL version. |
|
|
The radio button selected on the Task dialog. |
|
|
String representation for the query entered or selected on the dialog form. |
|
|
Ordinal position for the value in QueryChoices selected when the task dialog is executed. |
|
|
Implements a task dialog. |
Version 4.0 | Generated 2025-05-03 | Home |