Important alert: (current site time 7/16/2013 3:40:23 AM EDT)
 

winzip icon

Animated Gif Player ActiveX with Full Source in VB6

Email
Submitted on: 5/20/2000 9:17:09 PM
By: Stephen Lebans  
Level: Advanced
User Rating: By 29 Users
Compatibility: VB 5.0, VB 6.0
Views: 110839
 
     For the newest version that supports Local Color Tables and Transparency visit my Website here: http://www.lebans.com/animatedgifplayer.htm NEW! Animated Gif Player ActiveX Control with full source code. Written completely in VB6, no third party or external DLL's required. This is a complete rewrite of my earlier code to display Animated Gif's. Full featured and fully debugged!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
  3. Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.

Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

5/21/2000 7:59:48 AMSteSoft Software

Very good....
Thanx
(If this comment was disrespectful, please report it.)

 
5/21/2000 4:36:30 PMmajestic

works really well
(If this comment was disrespectful, please report it.)

 
5/21/2000 5:14:55 PMStephen Lebans

I had a request to add AUTOSIZE functionality to the Class. You can add an AutoSize property yourself, that part is straightforward. Here is the code that actually performs the autosizing of the usercontrol.

The autosize feature is simple to implement. Just add 2 lines of code.

Add this to the LoadGif function.

' These 2 lines are just for Frame of reference as to where
' to place AutoResize code
' Let go of the Mouse Input
ReleaseCapture

' OK HERE IS THE NEW CODE
' AutoResize to fit Gif exactly
UserControl.Width = UserControl.ScaleX(LogWidth + 1, vbPixels, vbTwips)
UserControl.Height = UserControl.ScaleX(LogHeight + 1, vbPixels, vbTwips)

(If this comment was disrespectful, please report it.)

 
5/22/2000 8:45:47 AMStephen Lebans

Just a reminder, the comments in the Source code state that Local Color Tables are not supported. Most Gif Construction software has the option to not use Local Color Tables. An alternative is to go to:
www.gifworks.com
Use their Online Gif Editor to REMOVE Transparency then ADD Transparency. This gets rid of the Local Color Tables.
I have just finished adding full support for Local Color Tables. Will debug and post later this week.
(If this comment was disrespectful, please report it.)

 
6/27/2000 10:48:25 AMBlue

Just what I'm looking for! This guy did it before I can even learn it! All I need to know now is where to get the GIF file spec.

(If this comment was disrespectful, please report it.)

 
9/7/2000 4:01:53 PMNick B.

I'm not sure what I may or may not have done to this code. I am using it to display animated banners. The problem is that they go too fast, like it isn't the way a web browser would view them... and they contiunaly loop, even if they have set the gif NOT to loop...

I was wondering if there is any update for this as I am in need of the latest version. Hope you can help me out.

-Nick

Please email me with more info:
bork99@mediaone.net
(If this comment was disrespectful, please report it.)

 
10/4/2001 2:13:08 AMBenj

Hey quick tip... Make a types for your header areas... if you need some help give a yell
(If this comment was disrespectful, please report it.)

 
5/24/2002 3:02:14 PMprogrammer@computingmadesimple.com

I got this error what should I do.
Unable to set version compatible component animatedgif.ocx.
(If this comment was disrespectful, please report it.)

 
5/24/2002 3:04:47 PMJason feiner

I got an error loading can not unable to set version compatible component animatedgif.ocx. I tried doing it manually once the program was loaded but i could not set it.
What can i do.
please help.
thank you
(If this comment was disrespectful, please report it.)

 
7/15/2002 3:30:56 AMzeff calilung

Could you send me a step by step tutorial about your code in Animated Gif Player .


(If this comment was disrespectful, please report it.)

 
7/20/2002 8:39:11 PM~Ian~

Hey. Everybody! This code is awesome. I tried using it and got it working in less then a minute! The only critisism I have is that the properties may be slightly tough for a beginner.

Beginners:
To start the gif animating, go to the event where you want it to start, and type

animatedgifctl1.starttimer


To stop it:
animatedgifctl1.stopgif


Other then that, the control was made obviously with alot of effort.

GOOD JOB!
(If this comment was disrespectful, please report it.)

 
11/20/2002 2:26:19 PM

Wow, this thing is rich. It work! Yes, it actually works without flicker! (I did have a little trouble getting it to install.) And, surprise of surprises, there are comments in the source! This source code is actually commented! Good thing too, it is definitely Advanced! Hey, once you install it, you don't have to be that advanced to use it.
(If this comment was disrespectful, please report it.)

 
3/28/2003 9:22:32 AM

it's really good man....
it gives me a lot of help yo ^_*
(If this comment was disrespectful, please report it.)

 
3/28/2003 9:23:53 AM

like i told you its cool man!!!
(If this comment was disrespectful, please report it.)

 
3/30/2003 8:52:42 AM

pls help me out about

Unable to set version compatible
component animatedgif.ocx.

please if anyone who knows about this kind of problems... please email me...

thnx. kudasai... ^_^

(If this comment was disrespectful, please report it.)

 
3/31/2003 11:18:43 PM

Can you include a stretch property so that the gif can be shrinked or enlarged according to the size of the control?
(If this comment was disrespectful, please report it.)

 
5/28/2003 12:53:21 PM

Just%2Bignore%2Bthe%2Bversion%2Bcompatible%2Berror%252E%2BIt%2Bworks%2Bfine%252E%2BI%2Bd o%2Bhave%2Ba%2Bproblem%2Bthough%252C%2Bsometimes%2Bthe%2Bgif%2Bwill%2Bload%2Band%2Bstart%252C%2Bothe r%2Btimes%2Bit%2Bwon%2527t%252E%2BAny%2Bideas%2Banybody%253F
(If this comment was disrespectful, please report it.)

 
9/13/2003 11:28:11 AMJoep

Well it works .... but after I add this to my project, compile it, run it:

Gif 'plays', however when I quit the program it doesn't disappear from tasklist. In other words it's still running until I kill it.
(If this comment was disrespectful, please report it.)

 
12/4/2003 10:46:33 AM

I have utilized your run 'gif' program, and I am very grateful for its presence on the web. The fact that the source code is present (as received from your web site), allows me to work on other graphic concepts.

If you have an rtf box that will write directly to a picturebox, that would be a great and wonderous little ocx as well (hint hint, nudge nudge)

Thanks Again!
(If this comment was disrespectful, please report it.)

 
6/28/2004 10:14:23 PM

This control has worked great for me, but using the GUI resource tracker at vbaccelerator.com I have found this control has a susbstantial GDI memory leak.

I'm trying to located it, but it's not easy. Probably a brush or two not being cleaned up properly.


(If this comment was disrespectful, please report it.)

 
7/27/2004 1:02:20 AM

Hi I got GIF conveter from this site it is asking for animatedgif.ocx how can i get it plzzzzzzzzzzzzzzzzzz help me out. mail me the solutions plz on mudgal_kamal@rediffmail.com
(If this comment was disrespectful, please report it.)

 
9/21/2004 5:07:14 AM

good
(If this comment was disrespectful, please report it.)

 
2/16/2005 10:36:36 AM

Brilliant work. Been searching for something like this for a while, had settled for using avi's but then found this. Thanks alot.
(If this comment was disrespectful, please report it.)

 
4/12/2005 11:46:04 PM

please will somebody tell me how to set this up? i also get that error

Unable to set
version compatible
component
animatedgif.ocx.

maybe step by step instructions on what to do? thanks
(If this comment was disrespectful, please report it.)

 
9/18/2005 5:49:38 AMBramPelgrom

This code does not provide full support for GIF files. There are animated-gif files whereby the next frame is an addition to the current frame, unfortunately this is not implemented. I'll try to implement this myself. :)
(If this comment was disrespectful, please report it.)

 
6/8/2011 7:24:05 AMBuzz

i got error ocx ? please send code to me thanks
(If this comment was disrespectful, please report it.)

 
7/28/2012 10:34:30 AMJoaquim

i have tested these nice control and i have seen 2 problems:
1 - sometimes don't show the image, speaking in same image, and other times shows it. i don't know these problem;
2 - i have some animated images that shows incorrectly(like don't clean the last image for show the next).
thanks
(If this comment was disrespectful, please report it.)

 
8/22/2012 2:20:20 PMwijsoft

Thank you, I will use it for software for kids :)
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.