TdxPSCustomPreviewWindow.SaveToIniFile(string) Method
Stores the Print Preview window’s settings to an INI file.
Declaration
procedure SaveToIniFile(const AFileName: string); overload;
Parameters
Name | Type |
---|---|
AFileName | string |
Remarks
The first overloaded variant stores settings to an INI file specified by the AFileName parameter. You can specify either the full path to the file or a path relative to an application’s starting folder. This overloaded variant opens the INI file for writing, calls the second overloaded variant, and passes this file and a name that uniquely identifies the Print Preview window on a form as parameters.
The first overloaded variant is called automatically when the Print Preview window’s settings are stored to an INI file with ExpressPrinting System settings. To enable this mode, assign dxstIniFile to the OptionsStoring.StorageType property of the currently active engine controller and designate the destination file via the engine controller’s OptionsStoring.IniFileName property. If this mode is disabled, you can manually save the Print Preview window’s settings using the SaveToIniFile method within a component printer’s OnAfterPreview event handler.
The second overloaded variant does nothing. It is overridden in the TdxPSPreviewWindow class (a TdxPSCustomPreviewWindow descendant) to store the Print Preview window’s settings to a specified section of a certain INI file that is currently open.
The second overloaded variant is called internally by the first overloaded variant and the SaveToRegistry method, which pass the default parameter values as parameters.
To load the Print Preview window’s settings from an INI file, call the LoadFromIniFile method.
Note
Calling the SaveToIniFile method has no effect if the dxPSEngine.SaveFormsPosition option is set to False.