gpt4 book ai didi

inno-setup - Inno Setup - 图像作为安装程序背景

转载 作者:行者123 更新时间:2023-12-05 05:22:14 28 4
gpt4 key购买 nike

图像作为安装程序背景。如何使用 inno 5.5.9 做到这一点?

enter image description here

最佳答案

我认为这在 Inno Setup 中是不可能的。也许是一些 Inno Setup 克隆。

问题是Inno Setup中的所有标签都是TStaticText,不透明。因此,您必须将所有内容替换为 TLabel。而且有很多。它们由 Inno Setup 管理。因此,您将不得不不断将新的 TStaticText 更新为由 Inno Setup 设置为原始 TLabel 的值。这甚至可能是不可能的。


所以实际上,可以像您的问题一样创建一个页面。但只是因为没有标准的 Inno Setup 标签。但您无法隐藏所有这些。

Installer with background image

procedure InitializeWizard();
var
BackImage: TBitmapImage;
begin
{ Hide top panel }
WizardForm.MainPanel.Visible := False;

{ Adjust "select dir" page controls for a stretched inner page size }
WizardForm.DirEdit.Left :=
WizardForm.DirEdit.Left + WizardForm.InnerNotebook.Left;
WizardForm.DirEdit.Top := WizardForm.DirEdit.Top + WizardForm.InnerNotebook.Top;
WizardForm.DirBrowseButton.Left :=
WizardForm.DirBrowseButton.Left + WizardForm.InnerNotebook.Left;
WizardForm.DirBrowseButton.Top :=
WizardForm.DirBrowseButton.Top + WizardForm.InnerNotebook.Top;

{ Hide non-transparent labels }
WizardForm.DiskSpaceLabel.Visible := False;
WizardForm.SelectDirBrowseLabel.Visible := False;
WizardForm.SelectDirLabel.Visible := False;

{ Stretch the outer page across whole form }
WizardForm.OuterNotebook.Width := WizardForm.ClientWidth;
WizardForm.OuterNotebook.Height := WizardForm.ClientHeight;

{ Stretch the inner page across whole outer page }
WizardForm.InnerNotebook.Left := 0;
WizardForm.InnerNotebook.Top := 0;
WizardForm.InnerNotebook.Width := WizardForm.OuterNotebook.ClientWidth;
WizardForm.InnerNotebook.Height := WizardForm.OuterNotebook.ClientHeight;

{ Put buttons on top of the page (image) }
WizardForm.BackButton.BringToFront()
WizardForm.NextButton.BringToFront();
WizardForm.CancelButton.BringToFront();

{ Add a background image }
BackImage := TBitmapImage.Create(WizardForm);
BackImage.Parent := WizardForm.SelectDirPage;
BackImage.Top := 0;
BackImage.Left := 0;
{ ... }
BackImage.Bitmap.LoadFromFile(...);
end;

类似问题:

关于inno-setup - Inno Setup - 图像作为安装程序背景,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41049054/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com