How to use Animated Gif in a delphi form

前端 未结 3 1444
广开言路
广开言路 2020-11-29 05:05

I think theres no native support to gif animated images.

How is the best way? any free component that allow that? I was thinking in using a TImage and a ImageList +

3条回答
  •  青春惊慌失措
    2020-11-29 05:45

    this is simply loading an animated gif and not making one

    procedure TForm1.FormCreate(Sender: TObject);
    
    begin
    
      ( Image1.Picture.Graphic as TGIFImage ).Animate := True;// gets it goin'
    
      ( Image1.Picture.Graphic as TGIFImage ).AnimationSpeed:= 500;// adjust your speed
    
      Form1.DoubleBuffered := True;// stops flickering
    
    end;
    

    stackoverflow has helped me and so my little bit in return :)

提交回复
热议问题