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.

IniFileName property

Project: Window State Components.

Unit: PJWdwState.

Class: TPJWdwState

Applies to: ~>5.0

property IniFileName: string;


This property specifies the name of the ini file that will be used to record the window’s size, position and state. The file is accessed by both the Restore and Save methods.

The default value of the property is the empty string.

The behaviour of the property was changed at v5.5:


The value of IniFileName can be overridden at run time if you handle either the OnGetIniData or OnGetIniDataEx [~>5.5] properties. This can be useful when the AutoSaveRestore property is True and you want to specify the ini file name at run time. In this case setting IniFileName at run time will not work because the form will be restored before you have an opportunity to change the property value. However the OnGetIniData and OnGetIniDataEx events are triggered before the form restores, enabling the file name to be specified.

You are strongly recommended not to store the ini file in the Windows directory. On Windows Vista and later an attempt to write to the Windows directory may be redirected to the virtual store.

You should not use the directory containing the executable program if it is stored in the Program Files directory (or similar), since you may not have write access to it.

See Also