【InnoSetup】自定义右上角的图片和左边的图片

Inno Setup用Delphi写成,其官方网站同时也提供源程序免费下载。它虽不能与Installshield这类恐龙级的安装制作软件相比,但也当之无愧算是后起之秀。Inno Setup是一个免费的安装制作软件,小巧、简便、精美是其最大特点,支持pascal脚本,能快速制作出标准Windows2000风格的安装界面,足以完成一般安装任务。

[Setup]

;右上角图片背景颜色

WizardSmallImageBackColor=clBlue

;右边图片背景颜色

WizardImageBackColor=clBlue

;左边图片是否拉伸 - yes;no

WizardImageStretch=no

;左边图片,图片尺寸大小参考inno安装目录下的WizClassicImage.bmp等文件

WizardImageFile=C:\Documents and Settings\Administrator\桌面\smqh\Left.bmp

;右上角图片,图片尺寸大小参考inno安装目录下的WizClassicSmallImage.bmp等文件

WizardSmallImageFile=C:\Documents and Settings\Administrator\桌面\smqh\topsmall.bmp

[code]

var

  PageName, PageDescription: TLabel;

procedure InitializeWizard();

begin

   PageName := TLabel.Create(WizardForm.MainPanel);

   PageName.Parent := WizardForm.MainPanel;

   PageName.Top := WizardForm.PageNameLabel.Top;

   PageName.Left := WizardForm.PageNameLabel.Left;

   PageName.Width := WizardForm.PageNameLabel.Width;

   PageName.Height := WizardForm.PageNameLabel.Height;

   PageName.Font := WizardForm.PageNameLabel.Font;

   PageName.Transparent := true;

  //PageName.Caption :='测试';

  PageName.Font.Color:=clRed;

   PageDescription := TLabel.Create(WizardForm.MainPanel);

   PageDescription.Parent := WizardForm.MainPanel;

   PageDescription.Top := WizardForm.PageDescriptionLabel.Top;

   PageDescription.Left := WizardForm.PageDescriptionLabel.Left;

   PageDescription.Width := WizardForm.PageDescriptionLabel.Width;

   PageDescription.Height := WizardForm.PageDescriptionLabel.Height;

   PageDescription.Font := WizardForm.PageDescriptionLabel.Font;

  PageDescription.Transparent := true;

  //PageDescription.Caption :='测试';

  PageDescription.Font.Color:=clPurple;

   WizardForm.WizardSmallBitmapImage.Top := ScaleY(0);

   WizardForm.WizardSmallBitmapImage.Left := ScaleX(0);

   WizardForm.WizardSmallBitmapImage.Width := WizardForm.MainPanel.Width;

   WizardForm.WizardSmallBitmapImage.Height := WizardForm.MainPanel.Height;

   WizardForm.PageNameLabel.Visible := false;

  WizardForm.PageDescriptionLabel.Visible := false;

end;



procedure CurPageChanged(CurPageID: Integer);

begin

  PageName.Caption := WizardForm.PageNameLabel.Caption;

  PageDescription.Caption := WizardForm.PageDescriptionLabel.Caption;

end;

猜你喜欢

转载自blog.csdn.net/luohaitao/article/details/127425173
今日推荐