Results 1 to 8 of 8

Thread: Animating GIFs

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    14

    Unhappy

    I am working on a project in my computer progamming class and I want to put GIFs on the forms. What is the code or the procedure to get them to animate correctly?

  2. #2
    New Member oBiOnE's Avatar
    Join Date
    Mar 2001
    Location
    ENgland
    Posts
    15

    Question

    Join the club, there is code on the VB-World sitee showing it, but it is long and requires multiple instances of the image.

    Does anyone know of an OCX that supports animated GIF's?

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    14

    Where?

    Where can I find this code on the site?

  4. #4
    New Member
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    3

    Cool The Answer to Animated Gifs OCX

    http://acky.net/vb/vbgraph/

    Download an OCX (Unregistered) from here. Public URL.

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2001
    Posts
    14

    Smile Cool Program

    It is a cool program and it works, but how do I apply it to my program? Really new at this.

  6. #6
    New Member
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    3

    Wink Heres what ya do

    Hi Stoopy.

    Nice to hear from you. The answer to your question is simple, but I have to know if your using VB6.

    Firstly, let me give you a little tutorial.

    OCX files are termed "ActiveX Controls", and are Microsoft(C) (Cant forget to do that!) -'s answer to reusable objects. What are reusable objects? I hear you ask?, well ...

    An Object to which I am referring could be a form, Textbox, Label, Chicken Curry or anything else you can place on a form. In fact, the form itself is an object.

    Objects have Properties and Methods, we will discuss this a little further later).

    1. The Object which you downloaded (The OCX file), must be resident in your Windows system directory (Win NT - C:\Winnt\System32 or Win 98 - C:\Windows\System). Make sure that the OCX control is copied into this directory first.

    2. Now you must register the control :

    If Win NT machine :

    select START from the windows toolbar
    select RUN
    enter : C:\WINNT\System32\regsvr32.exe C:\Winnt\System32\anigif.ocx
    You should now get a message, something to the extent of : anigif.ocx registration suceeded
    (something like that). This means that it is now available to use in VB. When you tested the file earlier (before I sent you this email), the above was automatically done. It is, however very important that you know the preceeding process.

    3. Open Your Project - heres the good bit

    4. In the "Projects" menu, select "Components". You should be able to see "Animation GIF OLE CONTROL". Tick this box.

    5. In your toolbox on the screen, you should see a new icon appear. This is the Animation Gif control/object that you are going to use to create the animation.

    6. You must add the control to the form. Select the control from the form and use it like you would any other control - ie click on a form and drag-open the gif control - will be flat and greyyed as there is nothing in it at the moment.

    7. Now go down to the Properties section and select "GIF". Next to this will be a "(none)" thingy. You have to select this "(None)" until a small box "..." appears. Click this button and a file selection box will appear. Select your gif file here (should be easy enough to follow), and voila!!!

    One VERY important point to make is once you have the Gif in the project, if you are going to show this project to a teacher, Make sure it all works fine by testing it on another computer. Also, if your going to use this control in any commercial stuff of your own, please abide by the Licencing on the product - all programmers have to earn a crust somehow.

    For further information, let me know.

    Regards
    Mister BIG.

  7. #7
    New Member
    Join Date
    Mar 2001
    Location
    Ireland
    Posts
    3

    Forgot something

    Hi Stoopy.

    I forgot, in your code you must use AniGIF1.Play at the point that you want it to animate, or it will just display the initial gif (unanimated). I would suggest doing this in the Form.Load Procedure, but you can put it anywhere you wish - its your project

    Regards,
    Mr BIG.

  8. #8
    New Member
    Join Date
    Mar 2001
    Location
    Erode (TamilNadu) India
    Posts
    1

    Exclamation Reply for playing gif

    You cannot animate a gif inside the formusing image or picture control.

    For that you must first covert the gif file into an Avi file using Animation shop or Corel Photopaint softwares and after that make use of Animation control in (Windows common controls) in the components bar in project menu.

    And place that animation control in the form and give

    Animation1.open "C:\Kumar\Zingi.avi"
    and don;t forget to set Animation1.Autoplay = True

    like this in your coding.

    You will be amazing to see the animation on your form.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width