在Inno设置向导的顶部面板中显示图像,而不是页面标题和说明

AL-*_*hab 1 inno-setup

我想在向导顶部的空间中放置一个图像,如图所示.并隐藏页面标题和说明.

在此输入图像描述

Mar*_*ryl 5

MainPanel用图像覆盖并隐藏其所有其他组件(WizardSmallBitmapImage,PageDescriptionLabelPageNameLabel):

[Files]
Source: "rainbow.bmp"; Flags: dontcopy

[Code]

procedure InitializeWizard();
var
  BitmapImage: TBitmapImage;
begin
  ExtractTemporaryFile('rainbow.bmp');
  BitmapImage := TBitmapImage.Create(WizardForm);
  BitmapImage.Parent := WizardForm.MainPanel;
  BitmapImage.Width := WizardForm.MainPanel.Width;
  BitmapImage.Height := WizardForm.MainPanel.Height;
  BitmapImage.Stretch := True;
  BitmapImage.AutoSize := False;
  BitmapImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\rainbow.bmp'));

  WizardForm.WizardSmallBitmapImage.Visible := False;
  WizardForm.PageDescriptionLabel.Visible := False;
  WizardForm.PageNameLabel.Visible := False;
end;
Run Code Online (Sandbox Code Playgroud)

彩虹精灵


另请参见如何隐藏主面板并在整个页面上显示图像?
Inno设置 - 页面名称和描述标签中文本下的透明度.