System Delphi

Title: How to enable and disable the animation of windows
Info: TAnimationInfo;
begin
ZeroMemory(@Info,SizeOf(Info));
Info.cbSize := SizeOf(TAnimationInfo);
BOOL(Info.iMinAnimate) := Value;
SystemParametersInfo(SPI_SETANIMATION, SizeOf(Info), @Info, 0);
end;
procedure TForm1.Button1Click(Sender: TObject);
begin
SetAnimation(True);
end;