Reputation: 35
Is there a way to use GIFs in Delphi 11? I tried several different ways and I never get a result.
I tried to install the TRxLib package, but inside it does not come with RXgifAnimated, as I had read in a question. Maybe because mine is Delphi 11?
Well, is there a way?
Upvotes: 2
Views: 915
Reputation: 21045
You can use a TImage
to display an animated GIF image.
Example:
TImage
to a formGIF
image to the TImage
Note! If you don't load a GIF image at design time, you must manually add the Vcl.Imaging.GIFImg
unit to the uses
.
procedure TForm4.Button1Click(Sender: TObject);
begin
with (Image1.Picture.Graphic as TGifImage) do
begin
AnimationSpeed := 100; // percent of normal speed, range 0 through 1000
Animate := True;
end;
end;
Upvotes: 5