Wednesday, 3 April 2013

How to use an animated GIF in Delphi

In the latest versions of Delphi you can easily use animated GIFs, here are the steps to add one to a form.

  1. Add a standard TImage component.
  2. In the picture property select the GIF file using the ellipsis.
  3. The TGifImage will require GIFImg adding to the uses clause.
  4. In code to set the animation going do the following:
(Image1.Picture.Graphic as TGIFImage).Animate := True;

No comments:

Post a Comment