[VB6] Animated GIF Control-VBForums
Results 1 to 5 of 5

Thread: [VB6] Animated GIF Control

  1. #1

    Thread Starter
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    16,409

    [VB6] Animated GIF Control

    Posting this as a gift, take it or leave it. An older project and it will not be modified or enhanced.

    The project only supports GIFs, animated or not. It is compact, rather simple, but offers several user-defined options. This UserControl can be created as a stand-alone OCX or simply added to any existing project, as-is. The UserControl is just 1 file and is 100% self-contained with no dependencies.

    The control is windowless, light weight, and also easy on CPU usage. I wouldn't try animating dozens of them at once though.

    There are 2 methods of loading a GIF

    1. Design-time only. Use the AnimatedGIF property sheet item. This property is disabled during run-time and does not support unicode file names

    2. Run-time only. Use one of these & review code comments
    a. LoadAnimatedGIF_Array
    b. LoadAnimatedGIF_File (unicode supported)
    c. LoadAnimatedGIF_Remote (unicode not supported)

    The logic I used with this control is unique and is described with the included RTF document. The change history and brief overview of public properties/methods can be found near top of the usercontrol's code.

    If all you want is a simple, easy control for animated GIFs, here you go...
    Attached Files Attached Files
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {GDI+ Classes/Samples} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
    {VB and DPI Tutorial} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  2. #2
    Lively Member
    Join Date
    Oct 1999
    Posts
    75

    Re: [VB6] Animated GIF Control

    OK, first I get this is an old, old post...!

    BUT this is really intriguing and supports some great functionality not found elsewhere. The one downfall I'm running into is that the GIF control is always placed behind other controls. Even setting the ZOrder does not seem to make any difference; would like to be able to place this control on top of a status bar for example. Is this possible or should I look for other solutions?

  3. #3
    Fanatic Member
    Join Date
    Jun 2012
    Posts
    797

    Re: [VB6] Animated GIF Control

    Quote Originally Posted by swambast View Post
    The one downfall I'm running into is that the GIF control is always placed behind other controls. Even setting the ZOrder does not seem to make any difference; would like to be able to place this control on top of a status bar for example. Is this possible or should I look for other solutions?
    Put the windowless control in a PictureBox. Then that PictureBox you can place on a StatusBar.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    3,099

    Re: [VB6] Animated GIF Control

    Quote Originally Posted by swambast View Post
    OK, first I get this is an old, old post...!
    If you want to take a look at a more recent approach, you can check-out Tutorial-Example #9 in this Article here:
    http://www.vbforums.com/showthread.p...BaseInterfaces

    It demonstrates the usage of IPictureDisp in a re-implementation which supports alpha-transparency
    for "Full-Alpha-Icons", PNGs and also (anmimated) GIFs - all available on the Picture-Property of
    normal VB-Controls.

    Here's a ScreenShot, which shows several loaded Icons and PNGs on normal VB-Image-Controls,
    and the animated GIF is shown in the Picture-Property of a normal VB-Command-Button (the Top-Right-one).


    HTH

    Olaf

  5. #5
    Lively Member
    Join Date
    Oct 1999
    Posts
    75

    Re: [VB6] Animated GIF Control

    Thank you Schmidt and Krool...!

    Schmidt, that is nice that you shared another option to consider, thank you. In the end, I ended up using LaVolpe's Animated GIF control as it appeared much simpler to me. I like it very much - great functionality and easy to use. To resolve my issue, I put the control in a Frame and it worked out great!

    Thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.