?
Solved

How to place animated gif's on forms

Posted on 2003-03-13
12
Medium Priority
?
1,191 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
11 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

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!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month9 days, 15 hours left to enroll

571 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