Inno Setup 中的全屏背景图像

fak*_*ruf 3 inno-setup

如何在 Inno Setup 编译器中为我们的设置提供背景全屏图像。

就像下面这张图一样。

在此输入图像描述

Mar*_*ryl 5

不要那样做。这违反了 Windows 设计准则。


无论如何,如果必须的话,请使用WindowVisible=yes指令MainForm启用旧版全屏安装程序模式,然后通过类型的全局变量修改(现在可见)背景窗口TMainForm

[Setup]
WindowVisible=yes

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

[Code]

procedure InitializeWizard();
var
  BackgroundImage: TBitmapImage;
begin
  BackgroundImage := TBitmapImage.Create(MainForm);
  BackgroundImage.Parent := MainForm;
  BackgroundImage.SetBounds(0, 0, MainForm.ClientWidth, MainForm.ClientHeight);
  BackgroundImage.Stretch := True;
  ExtractTemporaryFile('back.bmp');
  BackgroundImage.Bitmap.LoadFromFile(ExpandConstant('{tmp}\back.bmp'));
end;
Run Code Online (Sandbox Code Playgroud)

在此输入图像描述