2
A
回答
3
当“Finished”页面显示后,使用InnoTools InnoCallback库设置计时器。
[Files]
Source: "InnoCallback.dll"; Flags: dontcopy
[Code]
type
TTimerProc = procedure(HandleW, msg, idEvent, TimeSys: LongWord);
function SetTimer(hWnd, nIDEvent, uElapse, lpTimerFunc: LongWord): LongWord;
external '[email protected] stdcall';
function KillTimer(hWnd, nIDEvent: LongWord): LongWord;
external '[email protected] stdcall';
function WrapTimerProc(Callback: TTimerProc; ParamCount: Integer): LongWord;
external '[email protected]:InnoCallback.dll stdcall delayload';
var
PageTimeoutTimer: LongWord;
PageTimeout: Integer;
procedure UpdateFinishButton;
begin
WizardForm.NextButton.Caption :=
Format(SetupMessage(msgButtonFinish) + ' - %ds', [PageTimeout]);
end;
procedure PageTimeoutProc(
H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord);
begin
if PageTimeout > 1 then
begin
Dec(PageTimeout);
UpdateFinishButton;
end
else
begin
WizardForm.NextButton.OnClick(WizardForm.NextButton);
end;
end;
procedure CurPageChanged(CurPageID: Integer);
begin
if CurPageID = wpFinished then
begin
PageTimeout := 10;
UpdateFinishButton;
PageTimeoutTimer := SetTimer(0, 0, 1000, WrapTimerProc(@PageTimeoutProc, 4));
end;
end;
function NextButtonClick(CurPageID: Integer): Boolean;
begin
if CurPageID = wpFinished then
begin
KillTimer(0, PageTimeoutTimer);
PageTimeoutTimer := 0;
end;
Result := True;
end;
相关的问题:
相关问题
- 1. Inno Setup:安装程序在安装完成后从不启动
- 2. Inno Setup - 如何防止安装应用程序时的安装?
- 3. 安装程序关闭/完成/卸载时访问网站
- 4. Inno Setup的指定安装
- 5. Inno Setup:安装完成后执行命令/批处理文件
- 6. 如何使用Inno Setup安装程序升级MSI安装?
- 7. Inno Setup - 用于多个安装程序的安装程序
- 8. 安装在Inno Setup的
- 9. Inno Setup安装程序测试安装程序退出代码
- 10. 切换到Inno安装程序安装的完成页面
- 11. Inno Setup - 让Inno安装程序安装程序向主安装程序报告安装进度状态
- 12. Inno Setup:如何在安装过程中中止/终止安装?
- 13. 在Inno Setup安装中运行另一个安装程序
- 14. 用Inno Setup安装程序安装Windows shell扩展DLL
- 15. 如何登录Inno Setup安装?
- 16. 如何从Inno-setup安装DirectX redistributable?
- 17. 用Inno Setup安装Python
- 18. Inno Setup模块化安装
- 19. 如何使用Inno Setup取消安装程序?
- 20. 安装期间Inno Setup启动可执行文件(安装驱动程序)
- 21. 与Inno Setup一起安装时,应用程序无法工作
- 22. 如何在安装完成后找到安装文件夹?
- 23. Inno Setup - 如何在安装时隐藏某些文件名? (FilenameLabel)
- 24. 在完成的页面上启用Inno Setup的关闭/取消按钮
- 25. 确定何时VERYSILENT安装完成
- 26. INNO安装驱动程序已安装
- 27. Inno Setup的 - 避免显示子安装程序的文件名
- 28. Inno Setup的安装VB6应用程序的DLL
- 29. 检查XML的版本使用Inno Setup的安装程序
- 30. 在黑莓中的特定时间间隔后关闭后台应用程序
为什么要这样做? –
@MartinPrikryl我想使用类似于MessageBoxTimeout的函数,但是有一个页面,基本上就是完成页面,所以一旦安装完成,完成页面会在一段时间后关闭。 –