Skip to content

Commit

Permalink
Updated window state
Browse files Browse the repository at this point in the history
Like all the other XData projects, it runs and immediately minimizes itself, but is in a maximized state when it is restored.
  • Loading branch information
500Foods committed Oct 27, 2023
1 parent cb7e500 commit 933110f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions Unit2.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ object MainForm: TMainForm
OldCreateOrder = False
WindowState = wsMinimized
OnCreate = FormCreate
OnShow = FormShow
DesignSize = (
472
242)
Expand Down
11 changes: 11 additions & 0 deletions Unit2.pas
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ TMainForm = class(TForm)
procedure FormCreate(ASender: TObject);
procedure btSwaggerClick(Sender: TObject);
procedure btRedocClick(Sender: TObject);
procedure FormShow(Sender: TObject);
strict private
procedure UpdateGUI;
end;
Expand Down Expand Up @@ -84,6 +85,16 @@ procedure TMainForm.FormCreate(ASender: TObject);

end;

procedure TMainForm.FormShow(Sender: TObject);
begin
if MainForm.Tag = 0 then
begin
MainForm.Tag := 1;
MainForm.WindowState := wsMaximized;
MainForm.WindowState := wsMinimized;
end;
end;

procedure TMainForm.UpdateGUI;
begin
btStart.Enabled := not ServerContainer.SparkleHttpSysDispatcher.Active;
Expand Down

0 comments on commit 933110f

Please sign in to comment.