Ignore:
Timestamp:
Jul 19, 2024, 11:24:06 PM (2 months ago)
Author:
chronos
Message:
  • Fixed: Full screen mode switching on Windows.
  • Modified: Updated Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/FormEx.pas

    r74 r107  
    1313  private
    1414    FCounter: Integer; static;
     15    FFirstShow: Boolean;
    1516  protected
    1617    procedure DoShow; override;
     
    1920    procedure DoDestroy; override;
    2021  public
     22    FullScreen: Boolean;
    2123    PersistentForm: TPersistentForm; static;
    2224    ThemeManager: TThemeManager; static;
     
    4446begin
    4547  inherited;
    46   PersistentForm.Load(Self);
     48  if not FFirstShow and (not (csDesigning in ComponentState)) then begin
     49    FFirstShow := True;
     50    PersistentForm.Load(Self, False, FullScreen);
     51    FullScreen := PersistentForm.FormFullScreen;
     52  end;
    4753end;
    4854
     
    6874  end;
    6975
    70   PersistentForm.Load(Self);
    7176  Translator.TranslateComponentRecursive(Self);
    7277  ThemeManager.UseTheme(Self);
     
    7782procedure TFormEx.DoClose(var CloseAction: TCloseAction);
    7883begin
    79   PersistentForm.Save(Self);
     84  if  (not (csDesigning in ComponentState)) then begin
     85    PersistentForm.FormFullScreen := FullScreen;
     86    PersistentForm.Save(Self);
     87  end;
    8088  inherited;
    8189end;
Note: See TracChangeset for help on using the changeset viewer.