Window State Components
ReadMe

Contents

» Contents

Overview

The Window State Components can save and restore a window's size, position and state (minimized, maximized or normal) between program executions. Three components are provided that use different means of recording the window's information. They are:

All components implement the same core functionality that is controlled by some common properties and events:

TPJWdwState and TPJRegWdwState also support the OnReadWdwState event. Handling this event enables the stored window's state, size and position values before the window is restored. This event is called after reading the data and before sizing the window. TPJUserWdwState does not expose this event because the user is in charge of reading the data and can therefore modify it in the OnReadData event.

» Contents

Compatibility

The components are compatible with the Delphi Windows 32 bit and 64 bit compiler. They have been tested using Delphi 5, Delphi 7 and Delphi 2006 through to Delphi XE4. The components may on Delphi 4, but that has not been tested.

The components are for use with the VCL only: they are not compatible with FireMonkey.

.NET and non-Windows platforms are not supported.

» Contents

Installation

The Window State Components are supplied in a zip file. Before installing you need to extract all the files from the zip file, preserving the directory structure. The following files will be extracted:

In addition to the above files you will find the the source code of four demo projects along with read-me files in the Demos directory and its 1, 2, 3 and 4 sub-directories.

You can now install the components into the Delphi IDE. If you need help doing this see here.

Note that the help file included in the download can only integrate with the IDE in Delphi 4-7. For information on how to do this, see this article. Users of other versions of Delphi can either use the help file as a stand-alone file (in which case some links won't work) or you can use the Window State Components online documentation that can be accessed via the provided Internet short-cut.

NOTE: The help file is deprecated and is no longer being updated. The last update was in the v5.4.1 release. Changes and new features added since then have not been included in the help file. For up to date documentation please refer to the online documentation.

» Contents

Demo Projects

There are four demo projects included with these components. They are:

  1. StandardDemo.dpr
    Demonstrates how to use the components in the standard way, i.e. dropped on a form from the component palette. This demo uses TPJRegWdwState.
  2. StandAloneDemo.dpr
    Demonstrates how to create and use the components dynamically using the CreateStandAlone constructor. This demo uses TPJWdwState.
  3. UserDemo.dpr
    Demonstrates how to use TPJUserWdwState and load and save data in the OnReadData and OnSaveData events.
  4. MDIDemo.dpr
    Demonstrates the use of TPJWdwState with MDI applications.

Further information about the demo programs can be found in the file Demos\DemoReadMe.htm that is included in the download.

» Contents

Change log

A complete change log is provided in a text file that is included in the download.

» Contents

License and Credits

These components are released under the terms of the Mozilla Public License v2.0.

Thanks to the following who have contributed to this project:

Stefan Winter
Enrico Bortolazzi
Bruce J Miller
Craig Symons

All relevant trademarks are acknowledged.

» Contents

Bugs and Feature Requests

Bugs can be reported or new features requested via the Issue Tracker.

If no similar report or request has been recorded already, use the New Issue link to add a new issue. Please select the most appropriate template from the Templates drop down list.

» Contents

About the Author

I'm Peter Johnson – a hobbyist programmer living in Ceredigion in West Wales, UK, writing write mainly in Delphi. My programs and code are available from: http://www.delphidabbler.com/.

I can be contacted via the website.

Please let me know if you have any comments about the component, but please use the Issue Tracker noted above to report bugs and request new features.