This method displays the "Save" dialog which includes the file preview function. This dialog is used to select an image file to be saved.
Parameters
None
Return Value
Returns True if "Save" is selected. Returns if "Cancel" is selected.
Explanation
The SaveFile method displays the "Save" dialog which includes the file preview function. This dialog is used to select a directory and file name into which the image date is to be saved.
By setting the FilePath and FileExt properties it is possible to control the directory and types of files that are listed when the "Save" dialog is displayed. For details, please refer to the explanation for those properties.
However, if the FileName property contains a full path, the FilePath property will be ignored.
Prior to executing this method, if the ExtendedDialog property is set to true, when the dialog is displayed the preview and file information checkboxes are displayed. Even if the Preview and Information properties are False, these checkboxes will be displayed.
When the "Save" button is clicked the file name and path are set into the FileName property and the type of file is set into the SaveFileDlgFileType property.
Example:
C++Builder
bool Ret;
VImageKit1->FileIO->FileExt = "*;BMP;JPG;";
VImageKit1->FileIO->FilePath = "C:\\My Pictures";
VImageKit1->FileIO->FileName = ""; //By setting a blank
string here, the FilePath property is enabled.
//if the full path is set into the FileName property then the
FilePath property is disabled.
//VImageKit1->FileIO->FileName = "C:\\Images\\001.jpg";
VImageKit1->FileIO->ExtendedDialog = true;
VImageKit1->FileIO->Preview = false;
VImageKit1->FileIO->Information = false;
Ret = VImageKit1->FileIO->SaveFileDialog();
Delphi
Ret: Boolean;
VImageKit1.FileIO.FileExt := '*;BMP;JPG;';
VImageKit1.FileIO.FilePath := 'C:\My Pictures';
VImageKit1.FileIO.FileName := ''; //By setting a blank string here,
the FilePath property is enabled.
//if the full path is set into the FileName property then the
FilePath property is disabled.
//VImageKit1.FileIO.FileName := 'C:\Images\001.jpg';
VImageKit1.FileIO.ExtendedDialog := True;
VImageKit1.FileIO.Preview := False;
VImageKit1.FileIO.Information := False;
Ret := VImageKit1.FileIO.SaveFileDialog;