|
-
Nov 5th, 2000, 06:19 AM
#1
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?
-
Nov 5th, 2000, 07:15 AM
#2
_______
<?>
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
-
Nov 6th, 2000, 06:46 AM
#3
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)!
-
Nov 6th, 2000, 08:21 AM
#4
Member
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
-
Nov 6th, 2000, 09:48 AM
#5
Addicted Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|