安装时在Inno Setup中显示许可协议链接 [英] Show License Agreement link in Inno Setup while installation

查看:129
本文介绍了安装时在Inno Setup中显示许可协议链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为我的应用程序使用Inno Setup.我想在安装时在Inno Setup中显示一个链接(许可协议)(单独的许可协议向导除外).我想将此链接与某些任务结合起来.当用户单击该链接时,它将导航到特定的URL.

I am using Inno Setup for my application. I want to show a link (License Agreement) in Inno Setup while installation (except separate License Agreement Wizard). I want combine this link with some task. When user clicks that link it will navigate to particular URL.

推荐答案

我知道我来晚了...下面的代码脚本在向导表单的左下方创建了License Agreement链接标签.该标签具有带下划线的蓝色字体和悬停位置的手形光标,因此在外观上感觉像是一个常见的网页链接.发生点击事件时,将在默认的Web浏览器中打开指定的URL.然后,该标签将在除许可证页面一之外的所有向导页面上可见:

I know I'm quite late here... The following code script creates the License Agreement link label in the bottom left part of the wizard form. That label has a blue underlined font and a hand cursor on hover so it looks and feels like a common web page link. On its click event a specified URL is opened in a default web browser. This label is then visible on all wizard pages except the license page one:

[Code]
var
  LicenseLinkLabel: TLabel;

procedure LicenseLinkClick(Sender: TObject);
var
  ErrorCode: Integer;
begin
  ShellExec('', 'http://www.stackoverflow.com', '', '', SW_SHOW, ewNoWait, 
    ErrorCode);
end;

procedure InitializeWizard;
begin
  LicenseLinkLabel := TLabel.Create(WizardForm);
  LicenseLinkLabel.Parent := WizardForm;
  LicenseLinkLabel.Left := 8;
  LicenseLinkLabel.Top := WizardForm.ClientHeight - 
    LicenseLinkLabel.ClientHeight - 8;
  LicenseLinkLabel.Cursor := crHand;
  LicenseLinkLabel.Font.Color := clBlue;
  LicenseLinkLabel.Font.Style := [fsUnderline];
  LicenseLinkLabel.Caption := 'License Agreement';
  LicenseLinkLabel.OnClick := @LicenseLinkClick;
end;

procedure CurPageChanged(CurPageID: Integer);
begin
  LicenseLinkLabel.Visible := CurPageID <> wpLicense;
end;

结果(单击放大):

这篇关于安装时在Inno Setup中显示许可协议链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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