Changeset 29
- Timestamp:
- Jun 4, 2010, 7:10:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
PersistentForm/UPersistentForm.pas
r28 r29 48 48 if Form.Top > (Screen.Height - 50) then 49 49 Form.Top := Screen.Height - 50; 50 RestoredWidth := ReadIntegerWithDefault('RestoredWidth', Form.RestoredWidth); 51 RestoredHeight := ReadIntegerWithDefault ('RestoredHeight', Form.RestoredHeight); 52 RestoredTop := ReadIntegerWithDefault ('RestoredTop', (Screen.Height - Form.RestoredHeight) div 2); 53 RestoredLeft := ReadIntegerWithDefault ('RestoredLeft', (Screen.Width - Form.RestoredWidth) div 2); 54 Form.SetRestoredBounds(RestoredLeft, RestoredTop, RestoredWidth, RestoredHeight); 50 Form.WindowState := TWindowState(ReadIntegerWithDefault('WindowState', Integer(wsNormal))); 51 if Form.WindowState = wsMaximized then begin 52 RestoredWidth := ReadIntegerWithDefault('RestoredWidth', Form.RestoredWidth); 53 RestoredHeight := ReadIntegerWithDefault ('RestoredHeight', Form.RestoredHeight); 54 RestoredTop := ReadIntegerWithDefault ('RestoredTop', (Screen.Height - Form.RestoredHeight) div 2); 55 RestoredLeft := ReadIntegerWithDefault ('RestoredLeft', (Screen.Width - Form.RestoredWidth) div 2); 56 Form.SetRestoredBounds(RestoredLeft, RestoredTop, RestoredWidth, RestoredHeight); 57 end; 55 58 56 Form.WindowState := TWindowState(ReadIntegerWithDefault('WindowState', Integer(wsNormal)));57 59 if ReadBoolWithDefault('Visible', False) then Form.Show; 58 60 finally … … 71 73 WriteInteger('Top', Form.Top); 72 74 WriteInteger('Left', Form.Left); 75 WriteInteger('WindowState', Integer(Form.WindowState)); 73 76 WriteInteger('RestoredWidth', Form.RestoredWidth); 74 77 WriteInteger('RestoredHeight', Form.RestoredHeight); 75 78 WriteInteger('RestoredTop', Form.RestoredTop); 76 79 WriteInteger('RestoredLeft', Form.RestoredLeft); 77 WriteInteger('WindowState', Integer(Form.WindowState));78 80 WriteBool('Visible', Form.Visible); 79 81 finally
Note:
See TracChangeset
for help on using the changeset viewer.