在 Inno Setup 的屏幕中央显示启动画面

Display splash screen in the center of the screen in Inno Setup

我有这段代码,但它只在屏幕左上角显示启动画面。帮帮我如何将启动画面调到屏幕中央!

代码如下:

[Files]
;Hier die Bilddatei für das Splash:
Source: "C:\Users\MINHLUAN\Desktop\program\DatabaseClassic02.bmp"; \
  DestName: "Splash.bmp"; Flags: dontcopy nocompression

[Code]
var Splash  : TSetupForm;

function InitializeSetup(): Boolean;
var
  BitmapImage1 : TBitmapImage;
begin
  Splash := CreateCustomForm;
  Splash.BorderStyle := bsNone;

  BitmapImage1 := TBitmapImage.Create(Splash);
  BitmapImage1.AutoSize := True;
  BitmapImage1.Align := alClient;
  BitmapImage1.Left := 0;
  BitmapImage1.Top := 0;
  BitmapImage1.stretch := True;
  BitmapImage1.Parent := Splash;

  ExtractTemporaryFile('Splash.bmp');
  BitmapImage1.Bitmap.LoadFromFile(ExpandConstant('{tmp}') + '\Splash.bmp');

  Splash.Width := BitmapImage1.Width;
  Splash.Height := BitmapImage1.Height;
  
  Splash.Show;

  BitmapImage1.Refresh;

  Sleep(5000)

  Result := True;
end;

procedure InitializeWizard();
begin
  Splash.Close;
end;

使用TForm.Position:

Splash.Position := poScreenCenter;