Dear sirs,
I use C++ builder 6.0, and TGIFImage version 2.2, and i put gif image direct into form, the gif is animated, but when I insert into RichviewEdit(RichView), the gif image is not animated, but when I click on the RichviewEdit(RichView), the gif image can changes to next frame. following is my code:
void __fastcall TForm1::Button2Click(TObject *Sender)
{
TGIFImage *gif = new TGIFImage();
gif->LoadFromFile("animate.gif");
gif->Animate=true;
//gif->AnimationSpeed=1000;
rve->AnimationMode = rvaniOnFormat;
rve->InsertPicture("gif", gif, rvvaBaseline);
rve->StartAnimation();
rve->FormatTail();
}
what's wrong with me?
Thanks in advance!
GIF image doesnot animate
-
- Site Admin
- Posts: 17559
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Please read the instructions here:
http://www.trichview.com/forums/viewtopic.php?t=89
Briefly
1) Add RVGifAnimate.pas in your project
2) Assign rve->AnimationMode = rvaniOnFormat.
As far as I remember, FormatTail() does not initiate animation (unlike Format()), so you need either to call Format() one time before starting adding content with FormatTail(), or to call StartAnimation(), like you do.
TRichView does not use animation features of TGIFImage, it animates them itself, so all assignments to animation-related properties or variables of TGIFImage are useless.
http://www.trichview.com/forums/viewtopic.php?t=89
Briefly
1) Add RVGifAnimate.pas in your project
2) Assign rve->AnimationMode = rvaniOnFormat.
As far as I remember, FormatTail() does not initiate animation (unlike Format()), so you need either to call Format() one time before starting adding content with FormatTail(), or to call StartAnimation(), like you do.
TRichView does not use animation features of TGIFImage, it animates them itself, so all assignments to animation-related properties or variables of TGIFImage are useless.
Problem solved
Thanks Sergey Tkachenko,
I Add RVGifAnimate.pas in my project, the gif image animated.
thank you very much!!!
I Add RVGifAnimate.pas in my project, the gif image animated.
thank you very much!!!