Jump to content
dormky

GIF not playing in Delphi 10.3

Recommended Posts

Posted (edited)

It doesn't adapt the image size to the control size. Mods, please delete this post 🙂

Edited by dormky

Share this post


Link to post
Posted (edited)

1. add a timage to the form.

2. load the a picture via Object Inspector window (or load via code) 

3. use the following code snippet in a button event or other area of your source code. 

 

note: if the image is large and you shrink it, it may animate with image distortions. 

  form1.DoubleBuffered := true;
  (image1.picture.graphic as TGifImage).Animate := true;
  (image1.picture.graphic as TFifImage).AnimationSpeed := 150;

 

Edited by JohnLM

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×