Results 1 to 5 of 5

Thread: Howto - Insert an animated GIF on a form?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    Howto - Insert an animated GIF on a form?

    (one that will play it's animation will the form is loaded).

    Thanks!

  2. #2
    Guest
    Bunch of search results on the forums for animated gifs.

  3. #3
    Lively Member
    Join Date
    Feb 2000
    Posts
    118
    Kokopeli
    VB6 SP3

  4. #4
    Fanatic Member Wen Lie's Avatar
    Join Date
    Jul 1999
    Location
    Singapore
    Posts
    524

    Wink

    Just use the ocx/dll.
    If I'm not wrong, the ocx/dll name is
    Gif89.dll

    Cheers,
    Wen Lie
    Regards,
    [-w-]

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Oct 2000
    Posts
    84
    I thought there might have been an easier way - but that works great. I just need to include the bas file into my project and add the timer with this code (cool):

    Dim FrameCount As Long
    Private Sub Form_Load()

    Text1.Text = App.Path & IIf(Right(App.Path, 1) = "\", "", "\") & "clip.gif"
    Timer1.Enabled = False
    Timer1.Enabled = False
    If LoadGif(Text1, Image1) Then
    FrameCount = 0
    Timer1.Interval = CLng(Image1(0).Tag)
    Timer1.Enabled = True
    End If

    End Sub

    Private Sub Timer1_Timer()
    If FrameCount < TotalFrames Then
    Image1(FrameCount).Visible = False
    FrameCount = FrameCount + 1
    Image1(FrameCount).Visible = True
    Timer1.Interval = CLng(Image1(FrameCount).Tag)
    Else
    FrameCount = 0
    For i = 1 To Image1.Count - 1
    Image1(i).Visible = False
    Next i
    Image1(FrameCount).Visible = True
    Timer1.Interval = CLng(Image1(FrameCount).Tag)
    End If
    End Sub

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