Inno Setup-图像作为安装程序背景 [英] Inno Setup - Image as installer background

查看:122
本文介绍了Inno Setup-图像作为安装程序背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

图像作为安装程序背景.如何使用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:

  • 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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆