?
Solved

How to place animated gif's on forms

Posted on 2003-03-13
12
Medium Priority
?
1,189 Views
Last Modified: 2010-04-07
Dear Sir,
   I am not able to keep animated gif pictures on my form.Whenever i place a image box on my form and make its picture property point to an animated gif file , it doesn't work.The animated gif does not animate on the VB form. Can u please suggest me a way to animate the gif image on my form.
          I would be very grateful..
                Thanking You.
                       Sivajish.
0
Comment
Question by:sivajish
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
12 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 500 total points
ID: 8126973
0
 
LVL 43

Assisted Solution

by:TimCottee
TimCottee earned 500 total points
ID: 8126991
Hi sivajish,

Here is how to do it without using any extra controls. It isn't as easy as you might think but it can indeed be done.

http://www.freevbcode.com/ShowCode.Asp?ID=758

Tim Cottee MCSD, MCDBA, CPIM
http://www.timcottee.tk 

Brainbench MVP for Visual Basic
http://www.brainbench.com

Experts-Exchange Advisory Board Member
0
 
LVL 14

Expert Comment

by:aelatik
ID: 8126994
WebBrowser1.Navigate "about:blank"
WebBrowser1.Document.write "<img src='c:\gif.gif'>"
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Assisted Solution

by:DocM
DocM earned 500 total points
ID: 8127692
Hi sivajish,

Free Animation GIF Control (gif89.dll)
http://www.martin2k.co.uk/vb6/vb6download.php
0
 
LVL 7

Expert Comment

by:mquiroz
ID: 8133396
Hi Sivajish,

THIS IS VERY, VERY EASY.

Just a few days ago I did what you need now, just go to www.gamani.com and download their software (you have a free functional trial) and dissasemble the gif file on various still pictures (after all animated gifs are nothing more than sets of multiple still gifs).

Once you have your picture files, insert a matrix of picture control (you know picture(x).visible... blah, blah, blah...)

And then just to make it work put a timer control and do a loop to make visible each of the pictures while the others are kept hidden.

here's a piece of my code...

I use a gif of then pics, and my image control is named my_image.

i call this function from a timer with an interval of +/- 200 miliseconds...

Private Sub animation()
            If counter = 1 Then
              my_image(10).Visible = False
              my_image(1).Visible = True
              counter = counter + 1
            Else
              If counter <= 10 Then
                my_image(counter - 1).Visible = False
                my_image(counter ).Visible = True
                counter = counter + 1
              Else
                counter = 1
              End If
            End If
End Sub

Hope this code helps!

0
 
LVL 15

Assisted Solution

by:JackOfPH
JackOfPH earned 500 total points
ID: 8133578
hi! you can use this code so that you can insert your .gif on the form. I ask it some months ago, it is perfect!!! just try it!

http://www.mvps.org/vbnet/code/bitmap/loadgif.htm
0
 
LVL 1

Expert Comment

by:reinhardt007
ID: 8135353
Plain and Simple

Add a text box (Text1), a Listbox (List1), label (Label1), three command buttons (Command1, Command2, Command3), and a Timer (Timer1) to a  form. Add an image control, and set its Index property to 0 to create a control array. Add the following code to the form, then save the project and place some animated GIFs in the same folder as the project - it looks in the local folder as coded (see bottom of this page for a few to test with).

*** code removed at the request of its author by Netminder, Site Admin ***
*** to view the code, click the link in the post above, as that site is this post's source ***
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 8135365
sivajish, are you aware that you need to close your questions when you get your answer? You do this by accepting a comment (by clicking the Accept button on the gray bar that splits comments).

Please maintain:

Questions Asked 3
Last 10 Grades Given  
Question Grading Record 0 Answers Graded / 0 Answers Received
0
 

Expert Comment

by:CleanupPing
ID: 9056371
sivajish:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 9060473
My recommandation: split points between : emoreau, TimCottee, DocM, JackOfPH
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 9692820
Moderator, my recommended disposition is:

    Split points between: emoreau and TimCottee and DocM and JackOfPH

DanRollins -- EE database cleanup volunteer
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question