AutoSaveRestore property

Project: Window State Components.

Unit: PJWdwState.

Class: TPJCustomWdwState

Applies to: ~>5.0

property AutoSaveRestore: Boolean;

Description

Determines whether the window’s size, position and state is automatically restored on creation and stored on destruction.

The AutoSaveRestore property, when set to true, causes the component to automatically restore the owning containing form’s size, position and state when the window is created and to save the information when the window is destroyed.

The property should set at design time. Setting the property at run time has no effect on whether the window’s state is restored, since the window will already be created. However, changing the property at run time does determine whether the window’s display attributes are saved automatically on exit.

The effect of the property is equivalent to placing a call to Restore in the form’s OnCreate or OnShow event handlers and to a call to Save in the form’s OnDestroy event handler.

The default value of this property is False.