Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I minimize my installer in Inno Setup?

I created my own custom minimize button in Inno Setup.

I would like to know how to minimize my installer when I click on it.

The minimize should be just like the default minimize button on the border of the installer.

like image 511
yuval Avatar asked Oct 19 '25 13:10

yuval


2 Answers

To simulate a click on the minimize button in a window title, send WM_SYSCOMMAND message to the installer wizard form using the PostMessage support function:

const
  WM_SYSCOMMAND = 274;
  SC_MINIMIZE = $F020;

procedure MinimizeButtonClick(Sender: TObject);
begin
  PostMessage(WizardForm.Handle, WM_SYSCOMMAND, SC_MINIMIZE, 0);
end;
like image 183
Martin Prikryl Avatar answered Oct 22 '25 06:10

Martin Prikryl


You can use this code.

procedure MinimizeBtnClick(Sender: Tobject);
begin
 SendMessage(WizardForm.Handle,$112,61472,0);
end;
like image 32
James Adam Avatar answered Oct 22 '25 04:10

James Adam



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!