Changeset 176 for trunk/Packages/Common


Ignore:
Timestamp:
Jul 19, 2024, 8:29:45 PM (5 months ago)
Author:
chronos
Message:
  • Fixed: Main form was not visible on Windows task bar.
  • Fixed: Do not load/save form dimensions in design time.
Location:
trunk/Packages/Common
Files:
2 edited

Legend:

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

    r174 r176  
    1313  private
    1414    FCounter: Integer; static;
     15    FFirstShow: Boolean;
    1516  protected
    1617    procedure DoShow; override;
     
    4546begin
    4647  inherited;
    47   PersistentForm.Load(Self);
    48   FullScreen := PersistentForm.FormFullScreen;
     48  if not FFirstShow and (not (csDesigning in ComponentState)) then begin
     49    FFirstShow := True;
     50    PersistentForm.Load(Self);
     51    FullScreen := PersistentForm.FormFullScreen;
     52  end;
    4953end;
    5054
     
    7882procedure TFormEx.DoClose(var CloseAction: TCloseAction);
    7983begin
    80   PersistentForm.FormFullScreen := FullScreen;
    81   PersistentForm.Save(Self);
     84  if  (not (csDesigning in ComponentState)) then begin
     85    PersistentForm.FormFullScreen := FullScreen;
     86    PersistentForm.Save(Self);
     87  end;
    8288  inherited;
    8389end;
  • trunk/Packages/Common/PersistentForm.pas

    r175 r176  
    303303
    304304procedure TPersistentForm.SetFullScreen(State: Boolean);
     305{$IFDEF UNIX}
    305306var
    306307  OldHandler: TNotifyEvent;
    307308var
    308309  I: Integer;
     310{$ENDIF}
    309311begin
    310312  if State then begin
Note: See TracChangeset for help on using the changeset viewer.