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?
Printable View
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?
It isn't doen via code it is done through a control.
http://forums.vb-world.net/showthrea...threadid=31283
Thanks for writing...
...but i am sure, i saw the code for Animated Gifs somewhere (the code was just about 15 lines)!
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:
Where the filespec points to a valid animated GIF path or URL. When you run the program, Visual Basic displays the GIF.Code:WebBrowser1.Navigate "C:\Internet\anim.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:
Now when you run the form, Visual Basic displays the image sans scrollbar.Code:WebBrowser1.Navigate "about:<html><body scroll='no'><img src='D:\Internet\anim.gif'></img></body></html>"
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'