Inno Setup-图像作为安装程序背景 [英] Inno Setup - Image as installer background
问题描述
图像作为安装程序背景.如何使用inno 5.5.9做到这一点?
Image as installer background. How to do that with inno 5.5.9?
推荐答案
我认为在Inno Setup中这是不可能的.也许是一些Inno Setup克隆.
I do not think this is possible in Inno Setup proper. Maybe is some Inno Setup clone.
问题在于Inno Setup中的所有标签都是TStaticText
,这不是透明的.因此,您必须将所有内容替换为TLabel
.还有很多.它们由Inno Setup管理.因此,您将不得不以某种方式不断地将新的TStaticText
更新为通过Inno Setup设置为原始TLabel
的值.甚至不可能.
The problem is that all labels in Inno Setup are TStaticText
, which is not transparent. So you would have to replace all with TLabel
. And there's a lot of them. And they are managed by Inno Setup. So you would somehow have to continuously update the new TStaticText
's to the values set to original TLabel
's by the Inno Setup. It may not even be possible.
实际上,可以像您在问题中一样创建一个页面.但这仅仅是因为没有标准的Inno Setup标签.但是您无法隐藏所有这些内容.
So actually, it's possible to create a page like in your question. But only because there are no standard Inno Setup labels. But you cannot hide all of them.
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;
类似的问题:
Similar questions:
- 仅在页脚"上方显示背景图片:
如何隐藏主面板并在整个页面上显示图像? - 仅在页眉"和页脚"之间显示背景图像:
图片覆盖了Inno Setup中的整个页面.
- Displaying a background image above "footer" only:
How to hide the main panel and show an image over the whole page? - Displaying a background image between "header" and "footer" only:
Image covering whole page in Inno Setup.
这篇关于Inno Setup-图像作为安装程序背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!