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.
Project: Window State Components.
Unit: PJWdwState.
Class: TPJWdwState
Applies to: ~>5.0
procedure Save;
This method saves the state, size and position of the owning form’s window in an ini file.
If the ini file does not exist it is created. If it is not possible to create the file then the information is not saved.
For MDI child forms the window’s top and left coordinates are relative to the MDI main form’s client area. For other, top level, windows the coordinates are relative to the screen.
If the AutoSaveRestore property is true then Save is called automatically when the window is destroyed.
The process used to determine what the ini file name to use changed at v5.5:
<5.5
The ini file name is determined by the IniFileName property and the section within it used to store window state data is stored is determined by the Section property.
Any OnGetIniData event handler can override any of these property values.
If any of the directories in the path to the ini file name are not present then the save will fail and may raise an exception.
~>5.5
The ini file name is determined by both the IniRootDir and IniFileName properties and the section within the ini file used to store window state data is determined by the Section property.
Any OnGetIniDataEx or OnGetIniData event handler can override any of these property values.
If any of the directories in the path to the ini file name are not present they will be created.