Inno Setup中的全屏背景图像

问题描述:

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

How to give our setup a background full screen image in Inno Setup compiler.

就像下面这张照片一样.

Like this picture below.

请勿这样做.这违反了Windows设计准则.

Do not do that. It's against Windows design guidelines.

无论如何,如果需要,可以使用 指令,然后通过MainForm全局变量修改(现在可见)背景窗口"rel =" nofollow noreferrer> TMainForm .

Anyway, if you have to, enable legacy full screen installer mode using the WindowVisible=yes directive and then modify the (now visible) background window via MainForm global variable of type 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;