Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How do I insert animated gif's into my VB projects?

473 views
Skip to first unread message

jmt

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to
Using VB6, I need to beable to insert animated gif's into my project and not
have them loaded at runtime. I only have a couple of them. Imagelist doesn't
work, I'm already using a resource file for icons, and the animated gif's
don't seem to work with a resource file.

I guess what I need is to insert them into a DLL. How can I do this? An
example would be helpful.

Thanks,
jt


¢hrî§ 2øøø

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to

jmt wrote:

Private Sub Command1_Click()
Animation1.Autoplay = True
Animation1.Open "filename"
End Sub

(to get the control "Animation1", right click on the toolbox, and click
"Controls" then tick the box next to "Microsoft Windows Common Conrols 6.0")

and not sure if thats exactly what u wanted, but oh well.


¢hrî§ 2øøø

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to

¢hrמ§ 2ררר wrote:

oopz - its not


Pieter Jansen van Vuuren

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to
The animation control will not run gifs!
Try this http://www.freevbcode.com/ShowCode.Asp?ID=758

cheers

pieter

"¢hrמ§ 2ררר" <ch...@ukgalaxy.com> wrote in message
news:39C9E4E2...@ukgalaxy.com...

jmt

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to
I appreciate everyones replies on how to run an animated gif, but
unfortunately, this is not my question.

I don't what to load them from a file on the drive. I want them stored into
somethings such as a DLL or whatever, than load them at runtime.

Thanks,
jt


"jmt" <jmt...@hotmail.com> wrote in message
news:xFky5.9731$W45.1...@typhoon.tampabay.rr.com...

CyberAces

unread,
Sep 21, 2000, 3:00:00 AM9/21/00
to
jmt heeft geschreven in bericht ...

>Using VB6, I need to beable to insert animated gif's into my project and
not
>have them loaded at runtime. I only have a couple of them. Imagelist
doesn't
>work, I'm already using a resource file for icons, and the animated gif's
>don't seem to work with a resource file.
>
>I guess what I need is to insert them into a DLL. How can I do this? An
>example would be helpful.
>
>Thanks,
>jt


Look for the free GIF89.DLL (recently seen at www.planetsourcecode.com/vb)
which you can "preload" with a GIF, just like you can preload a picturebox.

John


jmt

unread,
Sep 22, 2000, 3:00:00 AM9/22/00
to

"CyberAces" <cybe...@yahoo.com> wrote in message
news:8qdv6n$4gi$1...@nereid.worldonline.nl...

John,

I guess, I'm batting zero. This is not what I am looking for. I don't want
to load the graphic images from a file. I want to get away of having all my
images on disk!
This DLL, loads from file only. I don't want that. I want to accumlate all
my graphics files, gif, jpg, etc.. into 1 (one) file only! Then from that 1
file only, load them into memory when I need them at runtime only!

- Jeff


Gary Labowitz

unread,
Sep 23, 2000, 3:00:00 AM9/23/00
to
Can you save them in a resource file as binaries? Then use LoadResData?
Gary

"jmt" <jmt...@hotmail.com> wrote in message
news:L6Fy5.18507$W45.2...@typhoon.tampabay.rr.com...

CyberAces

unread,
Sep 24, 2000, 9:24:44 PM9/24/00
to
Sometimes you wonder why programmers take the trouble of writing docs for
their applications, if nobody cares to read 'm. Sometimes you wonder why
someone doesn't believe you when you make an explicit statement.

Jeff, when I say that the GIF89 can be preloaded, then it does. I know this
by experience, simple as that. When you would have looked at the properties
and the docs that come with GIF89 control (don't bother about the English),
you would have seen it too:

--quote
4. Embed – if it is false then you have to distribute your gif as file with
your application, if it is true then gif file becomes part of your exe and
you don't have to distribute gif itself. When you set embed to true then
control will ignore FileName so if in design mode you set Embed to true and
then decide to change image then you have to set Embed to false, change
FileName and set Embed back to true.
--unquote (slightly edited, John)

When you want to have all graphics as one single file, the various formats
will give trouble. A trick could be to create the composed file yourself.
Keep track of the size of each graphic (and its type) when creating the big
file. Then you are able to calculate the offset of the grahic you want to
load. Read that part (your graphic) of the big file through Binary Mode into
a byte-array, from which you create a temporary file with the right
extension. This temp file can be loaded into the GIF control or plain
picturebox. Just an idea.

John


jmt heeft geschreven in bericht ...
>
>"CyberAces" <cybe...@yahoo.com> wrote in message
>news:8qdv6n$4gi$1...@nereid.worldonline.nl...

<SNIP>

andi zainal tjoppo

unread,
Oct 10, 2000, 8:50:42 PM10/10/00
to

Message is no longer available on the server
Outlook Express is unable to retrieve the requested message because
the server no longer has the message available.


--------------------------------------------------------------------------


a.. News servers regularly expire articles as they get older to make
space available for newer articles.
b.. IMAP servers can be accessed by multiple email programs at the
same time. If you are using two programs to access your mail the list of
messages maybe out of date. Use the refresh command to update this list.

Outlook Express

Message has been deleted

Coyote Red

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
but good advice for other apps!

¢hrמ§ 2ררר wrote:

> ¢hrמ§ 2ררר wrote:
>
> > jmt wrote:
> >

> > > Using VB6, I need to beable to insert animated gif's into my project and not
> > > have them loaded at runtime. I only have a couple of them. Imagelist doesn't
> > > work, I'm already using a resource file for icons, and the animated gif's
> > > don't seem to work with a resource file.
> > >
> > > I guess what I need is to insert them into a DLL. How can I do this? An
> > > example would be helpful.
> > >
> > > Thanks,
> > > jt
> >

> > Private Sub Command1_Click()
> > Animation1.Autoplay = True
> > Animation1.Open "filename"
> > End Sub
> >
> > (to get the control "Animation1", right click on the toolbox, and click
> > "Controls" then tick the box next to "Microsoft Windows Common Conrols 6.0")
> >
> > and not sure if thats exactly what u wanted, but oh well.
>

> oopz - its not


Michael Williams

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
I've tried what you suggested, and I can't find an animation control!

Mike

"Coyote Red" <jarms...@hagerty.com> wrote in message
news:3A12D764...@hagerty.com...


> but good advice for other apps!
>

> ¢hrî§ 2øøø wrote:

Steve Brey

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
Pirated software SUCKS doesn't it?

Steve

"Michael Williams" <Mi...@peetsmill.freeserve.co.uk> wrote in message
news:8uum8c$jg1$1...@news7.svr.pol.co.uk...

Joe Hart

unread,
Nov 15, 2000, 3:00:00 AM11/15/00
to
Select "Microsoft Windows Common Controls-2" in the Component Dialog -- it
should show up in your toolbox then.

- Joe

"Michael Williams" <Mi...@peetsmill.freeserve.co.uk> wrote in message
news:8uum8c$jg1$1...@news7.svr.pol.co.uk...
> I've tried what you suggested, and I can't find an animation control!
>
> Mike
>
> "Coyote Red" <jarms...@hagerty.com> wrote in message
> news:3A12D764...@hagerty.com...
> > but good advice for other apps!
> >

> > ¢hrמ§ 2ררר wrote:

Michael Williams

unread,
Nov 16, 2000, 3:00:00 AM11/16/00
to
Thank you, Joe. Got it now!

The only problem is that I cannot get it to work. The code I am using is:

Private Sub Animation1_Click()
With CommonDialog1
.Filter = "avi (*.avi;*.gif)|*.avi;*.gif"
.ShowOpen
End With
With Animation1
.AutoPlay = True
.Open CommonDialog1.FileName
End With
End Sub

I do understand that the control cannot play AVI files that are compressed
(except for RLE compression) or those that contain sound, and it may be that the
files I have tested with it are unplayable because of this. Even so, I cannot
get it to play any animated Gif files either. Is this control capable of playing
Gif files?

The error that I am getting is Run Time Error 35752 Unable to Open AVI File
(whether I attempt to load a Gif or an AVI).

Any clues?

Mike

"Joe Hart" <jh...@electroglas.com> wrote in message
news:8uv61...@news2.newsguy.com...

res

unread,
Nov 16, 2000, 3:00:00 AM11/16/00
to
use Gif89

"Michael Williams" <Mi...@peetsmill.freeserve.co.uk> wrote in message

news:8v0slr$ot8$1...@newsg2.svr.pol.co.uk...

Tim Hirtle

unread,
Nov 16, 2000, 3:00:00 AM11/16/00
to
If you wish the GIF89 control, send me an e-mail and I can send it to you.
It works great for animated gifs. It's only about 30kb.

Regards,
Tim Hirtle


res <r...@MAPSONsympatico.ca> wrote in message
news:TwWQ5.500499$1h3.13...@news20.bellglobal.com...

> > > > > ¢hrî§ 2øøø wrote:


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 80,000 Newsgroups - 16 Different Servers! =-----

LEXX

unread,
Nov 18, 2000, 7:19:20 PM11/18/00
to
Wondering bout this also. I put 4 picture boxes on a form, than added
animated gif89 images to each. set the visible props to false and have them
display on a click event. they appear on the click event but fail to
animate.

what gives here..


your help is requested !

> > > > ¢hrמ§ 2ררר wrote:

David Bridson

unread,
Nov 19, 2000, 3:00:00 AM11/19/00
to
> Wondering bout this also. I put 4 picture boxes on a form, than added
> animated gif89 images to each. set the visible props to false and have
them
> display on a click event. they appear on the click event but fail to
> animate.
>
> what gives here..
>
>
> your help is requested !

The picture box doesn't support animations, so you're not going to get it to
work with the Picture Box. Apparently, if you add Microsoft Windows Common
Controls 2 into your project, then use the Animation control, you should be
able to use Animated Gif89s.

David

Bill Freeman

unread,
Nov 25, 2000, 3:00:00 AM11/25/00
to
A cheesy workaround is to place an Internet Browser control on your form and
specify a local file (the gif) as the URL. This will display the gif on
your form and it will animate.

Good Luck,

Bill Freeman
bfre...@airmail.net


"LEXX" <le...@planetarymotion.net> wrote in message
news:c0FR5.7340$pw2.7...@typhoon.mn.mediaone.net...

> > > > > ¢hrî§ 2øøø wrote:

LEXX

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
I seen that in the properties setting of the picture box. I also noticed
when you place an image on a form it is automaticaly set as a BMP.

Going to give the URL method a try...

"Bill Freeman" <wdfr...@home.com> wrote in message
news:rEST5.236694$g6.109...@news2.rdc2.tx.home.com...


> A cheesy workaround is to place an Internet Browser control on your form
and
> specify a local file (the gif) as the URL. This will display the gif on
> your form and it will animate.
>
> Good Luck,
>
> Bill Freeman
> bfre...@airmail.net
>
>
> "LEXX" <le...@planetarymotion.net> wrote in message
> news:c0FR5.7340$pw2.7...@typhoon.mn.mediaone.net...

> > > > > > ¢hrî§ 2øøø wrote:

Henri Leboeuf

unread,
Nov 27, 2000, 3:00:00 AM11/27/00
to
Animated GIF
Here's a complete rewrite of the Animated Gif Player. It is now a Class
written completely in VB6, no 3'rd part DLL's required.
http://www.lebans.com/animatedgifplayer.htm
----------------------------------------------------------------------------
----
Animated GIF
To show you how the process works, we'll walk you through six easy steps to
create the simple animated GIF shown here.
http://www.builder.com/Graphics/Webanim/ss03.html
----------------------------------------------------------------------------
----
Animated GIF
Looking for Gif89 control. A free utility.
http://skyscraper.fortunecity.com/capacity/402/activex.html
--

Henri Leboeuf
Web page: http://www.generation.net/~hleboeuf/index.htm


"LEXX" <le...@planetarymotion.net> wrote in message

news:VJqU5.22359$pw2.2...@typhoon.mn.mediaone.net...


> I seen that in the properties setting of the picture box. I also noticed
> when you place an image on a form it is automaticaly set as a BMP.
>
> Going to give the URL method a try...
>
> "Bill Freeman" <wdfr...@home.com> wrote in message
> news:rEST5.236694$g6.109...@news2.rdc2.tx.home.com...
> > A cheesy workaround is to place an Internet Browser control on your form
> and
> > specify a local file (the gif) as the URL. This will display the gif on
> > your form and it will animate.
> >
> > Good Luck,
> >
> > Bill Freeman
> > bfre...@airmail.net
> >
> >
> > "LEXX" <le...@planetarymotion.net> wrote in message
> > news:c0FR5.7340$pw2.7...@typhoon.mn.mediaone.net...

0 new messages