使用Inno Setup Compiler创建的安装程序不显示“最小化动画" [英] Setup Programs created using Inno Setup Compiler doesn't display Minimize Animation

查看:129
本文介绍了使用Inno Setup Compiler创建的安装程序不显示“最小化动画"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是,为什么Inno Setup Compiler(Unicode或ANSI)及其所做的任何设置都不会像其他Windows程序中那样将显示最小的动画效果最小化?

My Problem is why Inno Setup Compiler (Unicode or ANSI) and any Setups made by it don't minimize showing a nice Minimizing Animation like in Other Windows Programs?

它显示了一个非常基本的最小化动画" ........为什么?

It displays a very basic Minimize Animation..........Why that?

我知道Borland Delphi是Inno Setup Compiler的编译器,但是Borland Delphi并没有那么糟糕的Minimize Animation ...........它通常在Windows System Windows最小化时最小化(例如Explorer) ,计算机,控制面板).................

I know Borland Delphi as Inno Setup Compiler's Compiler, but Borland Delphi doesn't have such a bad Minimize Animation...........It minimizes normally as Windows System Windows minimize (such as Explorer, Computer, Control Panel).................

我还注意到,Windows Installer创建器Nullsoft Scriptable Install System - NSIS和使用它进行的安装程序也像我说的那样最小化.

I also noticed that the Windows Installer Creater Nullsoft Scriptable Install System - NSIS and Setups made using it are also minimizing well like I said.

如何解决此问题?

更新的问题

我还添加了一个代码,可以在Inno Setup的WizardForm的许多Windows应用程序中看到漂亮的缩放最小化/还原动画",但是当我将此代码添加到Inno Setup后单击WizardForm的最小化"按钮时编译器的源代码,Nice Zooming动画无法播放,并且无法使用它进行最小化,添加此代码后,只能使用任务栏"按钮将其最小化.因此,这意味着此代码无法正常工作或出现其他任何错误...........为什么不正常??

I also added a code to play that nice Zooming Minimize / Restore Animation can be seen in Many Windows Applications on Inno Setup's WizardForm, But when I click the WizardForm's Minimize Button after adding this code to Inno Setup Compiler's Source Code, the Nice Zooming animation not plays and it never can be minimized using it, it only can be minimized using Taskbar button after adding this code. So it means this code not working or anything else wrong...........Why this is not working???

我添加到单元WizardForm的代码:

interface

uses
  Windows;

type
  TTrayZoom = class(TObject)
  private
    class function GetTrayRect: TRect;
    class procedure DoZoom(const Wnd: HWND; const Src, Dest: TRect);
  public
    class procedure ZoomToTray(const Wnd: HWND);
    class procedure ZoomFromTray(const Wnd: HWND);
  end;

implementation

class procedure TTrayZoom.DoZoom(const Wnd: HWND; const Src, Dest: TRect);
begin
  DrawAnimatedRects(Wnd, IDANI_CAPTION, Src, Dest);
end;

class function TTrayZoom.GetTrayRect: TRect;
var
  TaskbarWnd, TrayWnd: HWND;
begin
  TaskbarWnd := FindWindow('Shell_TrayWnd', nil);
  TrayWnd := FindWindowEx(TaskbarWnd, 0, 'TrayNotifyWnd', nil);
  GetWindowRect(TrayWnd, Result);
end;

class procedure TTrayZoom.ZoomFromTray(const Wnd: HWND);
var
  WndRect: TRect;
begin
  GetWindowRect(Wnd, WndRect);
  DoZoom(Wnd, GetTrayRect, WndRect);
end;

class procedure TTrayZoom.ZoomToTray(const Wnd: HWND);
var
  WndRect: TRect;
begin
  GetWindowRect(Wnd, WndRect);
  DoZoom(Wnd, WndRect, GetTrayRect);
end;

然后我将if WMSysCommand..... = SCMINIMIZE中的TTrayZoom.ZoomToTray称为TTrayZoom.ZoomToTray,并将HWND参数设置为WizardForm.Handle,将其从if WMSysCommand..... = SCRESTORE称为TTrayZoom.ZoomFromTray.

And I called TTrayZoom.ZoomToTray from if WMSysCommand..... = SCMINIMIZE and called TTrayZoom.ZoomFromTray from if WMSysCommand..... = SCRESTORE with the setting HWND parameter to WizardForm.Handle.

但是这些代码永远都行不通,我什至不知道它们是否被调用. :(

But those codes never works, I even don't know if they're get called or not. :(

在此WizardForm中播放此缩放动画有什么问题?

What is the problem playing this Zooming Animation in this WizardForm?

推荐答案

我会说有两个问题.

  1. 为带有任务栏按钮的窗口显示动画.向导表单没有任务栏按钮.

  1. The animation is shown for windows that have a task bar button. The wizard form does not have a task bar button.

安装程序的任务栏按钮属于一个隐藏的主窗口.

The task bar button of the installer belongs to a hidden main window.

从历史上看,安装程序具有全屏背景渐变蓝色窗口.甚至Inno Setup也支持.

Historically the installers had full screen background gradient blue windows. Even Inno Setup supported that.

虽然默认情况下不再启用该后台窗口( WindowVisible指令在Inno Setup的现代版本中默认为No),它仍然存在并拥有任务栏按钮.

While that background window is no longer enabled by default (the WindowVisible directive defaults to No in modern versions of Inno Setup), it still exists and owns the task bar button.

Inno Setup是使用古老版本的Delphi构建的,该版本可能无法很好地发挥最小化功能.

Inno Setup is built using an ancient version of Delphi that likely does not play nicely with the minimize feature.

通常,我想你应该提交功能请求/错误报告以解决此问题.

Generally, I'd say you should file a feature request/bug report to get this fixed.

这篇关于使用Inno Setup Compiler创建的安装程序不显示“最小化动画"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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