Topic: ANIMATED GIF

Hello MVD!

Is it possible to show a animated GIF or SWF file in the form?

Thanks!

Re: ANIMATED GIF

Hello manixs

First place an Image component on a panel (or on the form)
then

procedure frm_main_OnShow (Sender: String; Action: string);
begin
     Form1.Panel1.DoubleBuffered := True;                                                                                    //  to avoid flickering
     fForm1.Image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+'Images\gif.gif');
     Form1.Image1.AutoSize := True;
     TGIFImage(frm_main.Image1.Picture.Graphic).Animate := True;                                            // activation of the animation
     TGIFImage(frm_main.Image1.Picture.Graphic).AnimationSpeed:= 500;                                // setup speed
end;

JB

Re: ANIMATED GIF

Thanks so much Jean

Re: ANIMATED GIF

Excellent!

Re: ANIMATED GIF

jean.brezhonek wrote:

Hello manixs

First place an Image component on a panel (or on the form)
then

procedure frm_main_OnShow (Sender: String; Action: string);
begin
     Form1.Panel1.DoubleBuffered := True;                                                                                    //  to avoid flickering
     fForm1.Image1.Picture.LoadFromFile(ExtractFilePath(Application.ExeName)+'Images\gif.gif');
     Form1.Image1.AutoSize := True;
     TGIFImage(frm_main.Image1.Picture.Graphic).Animate := True;                                            // activation of the animation
     TGIFImage(frm_main.Image1.Picture.Graphic).AnimationSpeed:= 500;                                // setup speed
end;

JB


Hello Sir!

I got a problem.. When i have 2 animated gif,  whithin a form but different panel i embed the second gif din't play... please help!
Thanks!

Re: ANIMATED GIF

Hello manixs

I suppose you place a Form1.Panel2 and a Form1.Image2 ?
JB

Re: ANIMATED GIF

YES! You are correct jean... i am just a little bit dizzy...

Anyway, A bi big thanks to the support!