Inno Setup: добавить внешнюю картинку в левый нижний угол
Написал Ярослав Гасов   
30.11.2009

Share this!

[Files]
Source: C:\logo.bmp; DestDir: {tmp}; Flags: dontcopy

[code]
var
LogoImage:TBitmapImage;
LogoLabel: TLabel;
LogoPanel: TPanel;

procedure LogoOnClick(Sender: TObject);
var ReturnCode: Integer;
begin
ShellExec('open', 'http://сайт.ру', '', '', SW_SHOWNORMAL, ewNoWait, ReturnCode)
end;

procedure InitializeWizard();
begin
ExtractTemporaryFile('logo.bmp');
LogoPanel := TPanel.Create(WizardForm);
with LogoPanel do
begin
Parent := WizardForm;
Left := ScaleX(5);
Top := ScaleY(320);
Width := ScaleX(165);
Height := ScaleY(35);
BevelOuter := bvNone;
end;

LogoImage := TBitmapImage.Create(WizardForm);
with LogoImage do
begin
Parent := LogoPanel;
Left := ScaleX(0);
Top := ScaleY(0);
AutoSize:=true;
ReplaceColor:=clFuchsia;
ReplaceWithColor:=clBtnFace;
Bitmap.LoadFromFile(ExpandConstant('{tmp}\logo.bmp'));
end;

LogoLabel := TLabel.Create(WizardForm);
with LogoLabel do
begin
Parent := LogoPanel;
Width := LogoPanel.Width;
Height := LogoPanel.Height;
Transparent:=True;
Cursor := crHand;
OnClick:=@LogoOnClick;
end;
end;