Results 1 to 5 of 5

Thread: Animated Gifs

  1. #1
    Guest

    Smile

    How do i put an animated gif in vb? I know that there are readymade controls for it but i need the code to do it. Anybody?

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    It isn't doen via code it is done through a control.

    http://forums.vb-world.net/showthrea...threadid=31283
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3
    Guest

    Unhappy I am sure...

    Thanks for writing...
    ...but i am sure, i saw the code for Animated Gifs somewhere (the code was just about 15 lines)!

  4. #4
    Member
    Join Date
    Oct 2000
    Location
    Netherlands
    Posts
    54

    Wink A trick

    A trick would be to use the webbrwoser control, it can show animated GIF's. Here's the ZDNet tip:

    For the week of April 10th
    Display animated GIFs in VB

    While the Picture ActiveX control offers a great way to display graphics, it only shows the first image in an animated GIF. To display a fully animated GIF, without rebuilding the entire graphic frame by frame, you can use the WebBrowser control (just keep in mind that this control isn't available to machines without IE 3.0 or greater). To do so, select the Microsoft Internet Controls component. When you do, the WebBrowser control appears on Visual Basic's toolbar. Drop the control onto a form, then in the form's Load() event place the following code:

    Code:
    WebBrowser1.Navigate "C:\Internet\anim.gif"
    Where the filespec points to a valid animated GIF path or URL. When you run the program, Visual Basic displays the GIF.

    Unfortunately, the WebBrowser also displays a right-hand scroll bar--probably not what you want for a decorative image. Believe or not, you can turn this scrollbar off just like you would normally via HTML, as in:

    Code:
    WebBrowser1.Navigate "about:<html><body scroll='no'><img src='D:\Internet\anim.gif'></img></body></html>"
    Now when you run the form, Visual Basic displays the image sans scrollbar.
    A mind is like a parachute, it has to open to let it work
    www.2beesoft.com for Icon Manager with over 20.000 free icons
    VB6 Ent. SP4, ASP, W2000/W98

  5. #5
    Addicted Member LAURENS's Avatar
    Join Date
    Jan 2000
    Location
    Utrecht, the Netherlands
    Posts
    138
    Take a look at www.planetsourcecode.com and search for Animated gif in the VB section. You'll find several examples. I can assure you it is not 'a few lines of code'
    Regards,
    Laurens

    Using VB5 Enterprise edition SP3
    VB6 Enterprise edition SP5

Posting Permissions

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



Click Here to Expand Forum to Full Width