Changeset 207 for trunk/Packages/Common/UPersistentForm.pas
- Timestamp:
- May 22, 2018, 9:43:29 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/UPersistentForm.pas
r192 r207 19 19 FMinVisiblePart: Integer; 20 20 FRegistryContext: TRegistryContext; 21 FirstLoad: Boolean; 21 22 procedure LoadControl(Control: TControl); 22 23 procedure SaveControl(Control: TControl); … … 119 120 RootKey := RegistryContext.RootKey; 120 121 OpenKey(RegistryContext.Key + '\Forms\' + Form.Name, True); 122 FirstLoad := not ValueExists('WindowState'); 121 123 // Normal size 122 124 FormNormalSize.Left := ReadIntegerWithDefault('NormalLeft', FormNormalSize.Left); … … 227 229 228 230 if not EqualRect(FormNormalSize, FormRestoredSize) or 229 DefaultMaximizedthen begin231 (DefaultMaximized and FirstLoad) then begin 230 232 // Restore to maximized state 231 233 Form.WindowState := wsNormal; … … 263 265 FMinVisiblePart := 50; 264 266 FRegistryContext.RootKey := HKEY_CURRENT_USER; 267 FirstLoad := False; 265 268 end; 266 269
Note:
See TracChangeset
for help on using the changeset viewer.