Lazarus - TGifAnim. lazarus / 61-Beginners ---------------------------------------------------------------------- seghele0 · 2022-01-12 21:22 I'm using the 'Wile64' component = TGifAnim. How can I make the 'GifAnim' disappear after 5 seconds? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1;{$mode objfpc}{$H+}interfaceuses  Classes, SysUtils, Forms, Controls, Graphics,  Dialogs, ExtCtrls, Buttons, GifAnim;type  TForm1 = class(TForm)    GifAnim1: TGifAnim;    SpeedButton1: TSpeedButton;  procedure SpeedButton1Click(Sender: TObject);  private  public  end;var  Form1: TForm1; implementation{$R *.lfm} procedure TForm1.SpeedButton1Click(Sender: TObject);begin  GifAnim1.Animate:= True;  GifAnim1.FileName:= 'test1.gif';end; end. ---------------------------------------------------------------------- speter · 2022-01-12 23:51 In addition to jamie's comments... set the image's visible property to false. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i GifAnim1.visible := false; cheers S. ---------------------------------------------------------------------- seghele0 · 2022-01-13 16:21 After a lot of searching and trying again ( ), I probably found a solution. Can my code be made even more efficient? Thanks in advance. Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i unit Unit1;{$mode objfpc}{$H+}interfaceuses  Classes, SysUtils, Forms, Controls, Graphics,  Dialogs, ExtCtrls, Buttons, StdCtrls,  GifAnim;type   TForm1 = class(TForm)    GifAnim1: TGifAnim;    LblCountdown: TLabel;    PanelGIF: TPanel;    SpeedButton1: TSpeedButton;    Timer1: TTimer;     procedure SpeedButton1Click(Sender: TObject);    procedure Timer1Timer(Sender: TObject);   private       VARstart: integer;   public    //  end;var  Form1: TForm1; implementation{$R *.lfm}procedure TForm1.SpeedButton1Click(Sender: TObject);begin  PanelGIF.Visible:= True;  GifAnim1.Animate:= True;  GifAnim1.FileName:= 'test1.gif';  Timer1.Enabled := True;  Timer1.Interval := 1000;  LblCountdown.Caption := '';  VARstart := 5;end; procedure TForm1.Timer1Timer(Sender: TObject);begin  LblCountdown.Caption := Format('%d',[VARstart]);  Dec(VARstart);  if (VARstart < 0) then  begin    Timer1.Enabled := False;    LblCountdown.Caption := 'Finished';    PanelGIF.Visible:= False;  end;end;end.