Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / December 2004

Tip: Looking for answers? Try searching our database.

Animated GIF

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jaydeep - 24 Dec 2004 05:39 GMT
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
Richard A. Lowe - 25 Dec 2004 08:16 GMT
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

Signature

C#, .NET and Complex Adaptive Systems:
http://blogs.geekdojo.net/Richard

> Hi All,
>    I want to show animated GIF on form. I used ImageAnimator class to
[quoted text clipped - 13 lines]
> TIA
> Jaydeep
Jaydeep - 28 Dec 2004 07:51 GMT
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/default.asp?url=/library/en-us/dv_vstechart/ht
ml/vbtchShapedWindowsFormsControlsInVisualStudioNET.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, 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
[quoted text clipped - 23 lines]
> > TIA
> > Jaydeep
Jaydeep - 28 Dec 2004 13:16 GMT
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... :)

> Hello mr. Richard,
>    Thanks for your reply... I did exactly what you said and it is now
[quoted text clipped - 8 lines]
> that it will run under 16bit color settings. To validate my point please
> look at this link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_vstechart/ht
ml/vbtchShapedWindowsFormsControlsInVisualStudioNET.asp

> now my client wants me to develop a agent which will support 32 bit color
> settings also...
[quoted text clipped - 36 lines]
> > > TIA
> > > Jaydeep

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.