Animated GIF

  • Thread starter Thread starter Jaydeep
  • Start date Start date
J

Jaydeep

Hi All,
I want to show animated GIF on form. I used ImageAnimator class to
Animate and StopAnimate method to stop the animation. But my client says
that if he stops the animation in between then it should not stop at that
postion, but it should complete its remaining rotation and then stop.
e.g. if image starts rotating from its default postion and it goes till half
cycle, at that moment if user stops it then it should complete the remaining
half rotation and then stop.

I am developing windows application using C#.

Can anybody guide me regarding this problem.

TIA
Jaydeep
 
Hi, never done this, but it looks like if you call GetFrameCount() on the
Image that is being animated, you'll get the number of frames. Then if you
just handle the (EventHandler) onFrameChangedHandler pseudo-event in the
Animate method you can count where you are in the animation and then just
continue animating until you are at the last frame AND a stop has been
requested.

Does this help?
Richard
 
Hello mr. Richard,
Thanks for your reply... I did exactly what you said and it is now
working... thanks once again.
One more question, I am developing a windows application which is some what
similar to MSAgent but not using any reference of MSAgent. I am developing
my own Help Agent. So like for MSAgent there are different Characters, here
I have 3 animated GIFs as a Agent Character. As I said I am using
ImageAnimator class to draw animated GIF on form, also I am using Form's
Transparency key property.
Since I am using this property one restriction applied to my application is
that it will run under 16bit color settings. To validate my point please
look at this link
http://msdn.microsoft.com/library/d...apedWindowsFormsControlsInVisualStudioNET.asp
now my client wants me to develop a agent which will support 32 bit color
settings also...
Now my problem starts here, since I can not make forms background
transparent on 32 bit color settings using TransparencyKey property. what is
a way out to make Form's background transparent irrespective of color
settings ?
I hope I made my point clear, if not then let me know...

TIA
Jaydeep
 
Hi,
problem got solved... I was using backgroundImage and TransparencyKey
properties of form, thats why it was showing me color of image when I saw it
in 32 bit color settings... but instead of backgroundImage I used backcolor
and TransparencyKey it worked... :)

Jaydeep
 
Back
Top