Welcome to the new DelphiDabbler Code Library Documentation.

This is a new site that's currently running on alpha code. There are going to be bugs. If you discover any, please report them on the site's issues page (GitHub account required). Thanks.

Warning: Many URLs are going to change. Refer to the README file to discover which library project's documentation has been completed.

SubKey property

Project: Window State Components.

Unit: PJWdwState.

Class: TPJRegWdwState

Applies to: ~>5.0

property SubKey: string;

Description

This property defines the subkey under which the window’s size, position and state information is stored in the registry. This subkey is stored under the root key defined by the RootKey or RootKeyEx [~>5.6] property.

To ensure that the sub key is relative to the root and not the current key the subkey should begin with a ‘' character.

If the property is set to the empty string then it defaults to

'\Software\<Program EXE filename>\Window\<Form Name>'

where <Program EXE filename> is the program’s executable file name (without the path) and <Form Name> is the name of the form on which the TPJRegWdwState component is placed. For example, if your program is executed from C:\MyStuff\MyProg.exe and the form is named Form1 then setting SubKey to the empty string causes the property’s value to become

\Software\MyProg.exe\Window\Form1

The default value of the property is the empty string.