'Stop GIF after one execution in Delphi

I've a problem with GIFs in my Delphi project (I'm using Delphi 10.4 Sydney). I'm not able to stop GIF after one execution. I don't want to loop endlessly.

I've tried this:

frameGif := (Image1.Picture.Graphic as TGIFImage);
frameGif.AnimateLoop := false;
frameGif.Animate := true;

GIF doesn't stop after one execution.

I've found these solutions:

Can we stop animate in TGIFImage delphi component?

TGIFImage with animated GIF - events are not working - how to detect animation progress?

Is TGIFRenderer approach still only way?

How can I use OnLoop event (if I must) when I create GIFs programmatically during program execution?

Best regards....



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source