Skip to main content

TdxPSCustomPreviewWindow.LoadFromIniFile(string) Method

Loads the Print Preview window’s settings from an INI file.

Declaration

procedure LoadFromIniFile(const AFileName: string); overload;

Parameters

Name Type
AFileName string

Remarks

The first overloaded variant loads settings from 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, 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 restored from 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 load the Print Preview window’s settings using the LoadFromIniFile method within a component printer’s OnBeforePreview event handler.

The second overloaded variant does nothing. It is overridden in the TdxPSPreviewWindow class (a TdxPSCustomPreviewWindow descendant) to load the Print Preview window’s settings from 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 LoadFromRegistry method, which pass the default parameter values as parameters.

To save the Print Preview window’s settings to an INI file, call the SaveToIniFile method.

Note

Calling the LoadFromIniFile method has no effect if the dxPSEngine.OptionsStoring.SaveFormsPosition option is set to False.

See Also