There are two demo projects included with this component. They are:
StandardDemo.dpr
StandAloneDemo.dpr
These demos were originally developed using at Delphi 7 and have been tested
and found to work with Delphi 4, 6, 7 and 2006. They probably work correctly
with Delphi 5 and 2005. Note: StandardDemo.dpr
does not run correctly under Delphi, while StandAloneDemo.dpr
compiles and runs correctly.
This demo can be found in the Demos\1
sub-folder.
It has a main application window containing a button that, when clicked, displays a modal dialog box. Both the main window and the dialog contain a TPJRegWdwState component. The component in the main window is configured to persist window size, state and position. The dialog's component only persists window position. Window positions are not adjusted to remain within the work space.
Both forms demomstate the use of the OnReadWdwState event. The main form also shows how to use the OnGetRegData event and the AutoSaveRestore property.
This demo can be found in the Demos\2
sub-folder.
It displays a single application window that dynamically creates a TPJWdwState component using the CreateStandAlone constructor. A check box is available that is used to toggle whether windows that are partially off-screen when closed are restored in exactly the same position or are restored so all the window is visible.
The program uses the TPJWdwState component's IniFileName
and Section properties to require that window information is stored
in the [Window]
section of an ini file named
Custom.ini
in the demo application's directory.