如何在Inno Setup中设置动画效果

我想在安装程序中为控制功能生成动画。如何在Inno Setup中设置动画效果

You can see this video。

回答:

可以使用一个计时器来使用动画InnoTools InnoCallback DLL library

[Files] 

Source: InnoCallback.dll; Flags: dontcopy

[Code]

type

TTimerProc = procedure(H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord);

function SetTimer(hWnd: longword; nIDEvent, uElapse: LongWord; 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';

var

MainPanelAnimated: Boolean;

AnimationTimer: LongWord;

procedure AnimationTimerProc(

H: LongWord; Msg: LongWord; IdEvent: LongWord; Time: LongWord);

var

L: Integer;

begin

L := WizardForm.MainPanel.Left + ScaleX(5);

if L > 0 then

begin

L := 0;

KillTimer(0, AnimationTimer);

end;

WizardForm.MainPanel.Left := L;

end;

procedure CurPageChanged(CurPageID: Integer);

var

HoverTimerCallback: LongWord;

begin

if WizardForm.OuterNotebook.ActivePage = WizardForm.InnerPage then

begin

if not MainPanelAnimated then

begin

HoverTimerCallback := WrapTimerProc(@AnimationTimerProc, 4);

AnimationTimer := SetTimer(0, 0, 5, HoverTimerCallback);

WizardForm.MainPanel.Left := -WizardForm.MainPanel.Width;

MainPanelAnimated := True;

end;

end;

end;

的控制(动画实际上比图像显示更加光滑)

对于从右到左侧动画,请参见Inno Setup - Animate a control roll out from right in a determinate page。

以上是 如何在Inno Setup中设置动画效果 的全部内容, 来源链接: utcz.com/qa/258745.html

回到顶部