请把轻狂志网址 www.flighty.cn 加入收藏夹,其他俱为假冒,谨防被骗!赞助请点 这里!找东东请用右边的搜索 ===>
05 2013-09

INNO:安装向导上方位图透明拉伸示例脚本

作者:☆茗/aiq菡㊣ | 发布:2010-02-08 | 更新:2013-09-05 | 分类:部署 | Disposition | 热度:
此代码用于将安装程序向导上方的位图进行透明化并拉伸。

[Setup]
; 注意: AppId 的值是唯一识别这个程序的标志。
; 不要在其他程序中使用相同的 AppId 值。
; (在编译器中点击菜单“工具 -> 产生 GUID”可以产生一个新的 GUID)
AppId={{664F80A9-BB04-47D0-BEDD-DC655D24DB90}
AppName=我的程序
AppVerName=我的程序 1.5
AppPublisher=我的公司
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\我的程序
DefaultGroupName=我的程序
OutputDir=.
OutputBaseFilename=setup
Compression=lzma
SolidCompression=true
WizardSmallImageFile=smallpic.bmp

[Languages]
Name: default; MessagesFile: compiler:Default.isl

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Files]
Source: C:\Program Files\Inno Setup 5\Examples\MyProg.exe; DestDir: {app}; Flags: ignoreversion
; 注意: 不要在任何共享的系统文件使用 "Flags: ignoreversion"

[Icons]
Name: {group}\我的程序; Filename: {app}\MyProg.exe
Name: {group}\{cm:UninstallProgram,我的程序}; Filename: {uninstallexe}
Name: {commondesktop}\我的程序; Filename: {app}\MyProg.exe; Tasks: desktopicon

[Code]
var
  PageName, PageDescription: TLabel;

procedure InitializeWizard();
begin
  PageName := TLabel.Create(WizardForm.MainPanel);
  PageName.Parent := WizardForm.MainPanel;
  PageName.Top := WizardForm.PageNameLabel.Top;
  PageName.Left := WizardForm.PageNameLabel.Left;
  PageName.Width := WizardForm.PageNameLabel.Width;
  PageName.Height := WizardForm.PageNameLabel.Height;
  PageName.Font := WizardForm.PageNameLabel.Font;
  PageName.Transparent := true;
  //PageName.Caption :='测试,测试,测试,测试,测试,测试,测试,测试,测试,测试,测试,';
  PageName.Font.Color:=clRed;

  PageDescription := TLabel.Create(WizardForm.MainPanel);
  PageDescription.Parent := WizardForm.MainPanel;
  PageDescription.Top := WizardForm.PageDescriptionLabel.Top;
  PageDescription.Left := WizardForm.PageDescriptionLabel.Left;
  PageDescription.Width := WizardForm.PageDescriptionLabel.Width;
  PageDescription.Height := WizardForm.PageDescriptionLabel.Height;
  PageDescription.Font := WizardForm.PageDescriptionLabel.Font;
  PageDescription.Transparent := true;
  //PageDescription.Caption :='测试,测试,测试,测试,测试,测试,测试,测试,测试,测试,测试,';
  PageDescription.Font.Color:=clPurple;

  WizardForm.WizardSmallBitmapImage.Top := ScaleY(0);
  WizardForm.WizardSmallBitmapImage.Left := ScaleX(0);
  WizardForm.WizardSmallBitmapImage.Width := WizardForm.MainPanel.Width;
  WizardForm.WizardSmallBitmapImage.Height := WizardForm.MainPanel.Height;
  WizardForm.PageNameLabel.Visible := false;
  WizardForm.PageDescriptionLabel.Visible := false;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  PageName.Caption := WizardForm.PageNameLabel.Caption;
  PageDescription.Caption := WizardForm.PageDescriptionLabel.Caption;
end;

标签:Inno Setup(5)透明(2)拉伸(1)