

The components can be instructed to ignore the saved window state – the window is then displayed in the normal state. The Options property can be used to customise the way the window is restored: If AutoSaveRestore is set to False then the Restore and Save methods must be called from the host application. The components can automatically restore and save windows when the program starts up and closes down (using the AutoSaveRestore property). The component triggers OnReadData and OnSaveData events when it is ready to read or save data.Īll components implement the same functionality, controlled by some common properties and events, as follows: The component gives the most flexibility of all the components at the expense of placing the storage burden on the user. When using this component the user must handle saving and reading the window state data to or from persistent storage.

You are discouraged from using TPJRegWdwState for programs compiled with Delphi 5 and earlier that may be run on 64 bit Windows, because the component may not be able to access the 64 bit registry correctly and window state may be lost. Additional application defined data can be read from or written to the registry by handling the OnGettingRegData and OnPuttingRegData events that are triggered after the component reads or writes the registry. This event is triggered just before the registry is accessed. The registry root key and sub key where the information is stored are controlled by the RootKey(Ex) and SubKey properties, or by handling the OnGetRegData(Ex) event. Uses the registry to record window information. Alternatively the ini file and section names can be configured by handling the OnGetIniData event that is triggered immediately before the ini file is read or written. The user has control over the ini file name (via the IniFileName property) and the name of the section of the ini file where window information is recorded (using the Section property). Records window information in an ini file. Three components are provided that use different means of storing the information. The Window State Components can save and restore a window's size, position and state between program executions.
