Vcl.Dialogs.TSaveDialog.Execute
Delphi
function Execute(ParentWnd: HWND): Boolean; override;
C++
virtual bool __fastcall Execute(HWND ParentWnd)/* overload */;
inline bool __fastcall Execute(){ return TCommonDialog::Execute(); }
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | Vcl.Dialogs.pas Vcl.Dialogs.hpp |
Vcl.Dialogs | TSaveDialog |
Description
Displays the Save As dialog box.
Execute opens the Save As dialog, returning true when the user selects a file name and clicks Save. If the user cancels the save operation, Execute returns a false value.
The code signatures of Execute that appear above are actually overrides of the Execute overloads in the base class Vcl.Dialogs.TCommonDialog.Execute. There is one more overload of Execute for Delphi that appears in the inherited members from TCommonDialog, and this overload takes no input parameters.
The ParentWnd parameter is a window handle of type HWND MSDN. If none is provided, the current form handle is used, accessed from Vcl.Forms.TApplication.ActiveFormHandle in the global variable Vcl.Forms.Application.
// Delphi: if SaveDialog1.Execute then Memo1.Lines.SaveToFile(SaveDialog1.FileName);
// C++: if (SaveDialog1->Execute()) Memo1->Lines->SaveToFile(SaveDialog1->FileName);
See Also
- Vcl.Dialogs.TCommonDialog.Execute
- Vcl.Forms.TApplication.ActiveFormHandle
- Vcl.Forms.Application
- HWND MSDN
Code Examples