Using the WinAPI AnimateWindow function in the inno setup installer

Viewed 86

I'm trying to add an exit animation to my installer window.

I used WinAPI's AnimateWindow function for this purpose.

My code is as follows:

[Code]
function AnimateWindow(hWnd: Integer; dwTime, dwFlags: DWORD): Boolean;
external 'AnimateWindow@User32.dll stdcall';

Const
  AW_HIDE = $10000;
  AW_CENTER = $10;

{...}

procedure DeinitializeSetup();  
begin 
  AnimateWindow(WizardForm.Handle, 1500, AW_HIDE or AW_CENTER);
end;

But, for some reason, the animation only applies to the inside of the window, while the borders disappear only at the end of the animation, which makes the animation look bad.

What can I fix in the code so that the animation appears properly?


I have tried adding this line:

WizardForm.BorderStyle: = bsNone;

before calling the function to conceal the boundaries before the animation. But I'm looking for a more "real" solution.

0 Answers
Related