How can I add an image to the setup wizard, the bottom left?
Asked
Active
Viewed 421 times
1 Answers
3
As @TLama commented: Create a TBitmapImage
, set its parent to WizardForm
, position it where you want and load the picture from file.
[Files]
Source: "logo.bmp"; Flags: dontcopy
[Code]
<event('InitializeWizard')>
procedure InitializeWizardAddLogo();
var
Image: TBitmapImage;
begin
Image := TBitmapImage.Create(WizardForm);
with Image do
begin
Parent := WizardForm;
ExtractTemporaryFile('logo.bmp');
Bitmap.LoadFromFile(ExpandConstant('{tmp}')+'\logo.bmp');
AutoSize := True;
AutoSize := False;
Width := ScaleX(Width);
Height := ScaleY(Height);
Stretch := True;
Left := ScaleX(10);
Top :=
(WizardForm.ClientHeight + WizardForm.Bevel.Top +
WizardForm.Bevel.Height - Height)
div 2;
end;
end;
(the code [with event
attribute] is for Inno Setup 6)
Though tricky part is to handle screen scaling correctly. Hence, the AutoSize
trick and Scale*
calls.
You even might need to have different versions of the logo for different scaling factors.
See Inno Setup WizardImageFile looks bad with font scaling on Windows 7

Martin Prikryl
- 188,800
- 56
- 490
- 992