The following Delphi 2010 is an animated GIF support method:
1. Place a Image1 control on the form. Note: When you set its Picture property, loading an animated GIF is not animated.
2. Write the following code in the form's Formcreate event or other event (such as a button's Click event):
Image1.autosize: = True; Form1.autosize: = True; Image1.Picture.LoadFromFile (' C:\Gif89a.gif ');
Tgifimage (Image1.Picture.Graphic). Animationspeed: = 500; When you need to adjust the playback speed, you can adjust the value of the Animationspeed by code, the higher the value, the faster the animation.
Tgifimage (Image1.Picture.Graphic). Animate: = True;
3, the operation of the project, you can see this time can be shown animated GIF. More about GIF features, you can view the Gifimg.pas source files yourself.
If you set the loaded animated GIF file directly in the form's Image1 control and check the syntax of the project, the IDE of Delphi 2010 automatically adds the GIFIMG reference.
Delphi 2010 is a support method for animated GIF