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:WebBrowser1.Navigate "C:Internetanim.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 it
or not, you can turn this scrollbar off just like you would normally
via HTML, as in:WebBrowser1.Navigate "about:<html><body scroll='no'><img
src='D:Internetanim.gif'></img></body></html>"
Now when you run the form, Visual Basic displays the image sans
scrollbar.
Display animated GIFs in VB
By ElementK Journals, published on 14 Jul 2001
| Filed in
You might also like...
HTML forum discussion
-
CorelDRAW VBA: cdrTraceLineDrawing FAILS, producing single linear path instead of Centerline trace?
by dancemanj (0 replies)
-
client/server application using activex
by beautifulheart (0 replies)
-
System Error &H8007007E. The specifed module could not be found.
by swiftsafe (5 replies)
-
Invitation to take part in an academic research study
by researchlab (0 replies)
-
Send SMS with SMPP
by mmahmoud (0 replies)
HTML podcasts
-
Stack Overflow Podcast: Podcast #45 – Keeping it Sharp
Published 7 years ago, running time 0h54m
Our guest this week is Eric Lippert – language architect extraordinaire and famous for all his work at Microsoft in developing their languages Eric joined Microsoft right out of college and was originally working on VB It’s time for everyone’s favorite game: Name the Worst Feature of that Microso.
Comments