|
-
Nov 3rd, 2000, 10:21 PM
#1
Thread Starter
Lively Member
Howto - Insert an animated GIF on a form?
(one that will play it's animation will the form is loaded).
Thanks!
-
Nov 3rd, 2000, 10:31 PM
#2
Bunch of search results on the forums for animated gifs.
-
Nov 3rd, 2000, 10:32 PM
#3
Lively Member
-
Nov 3rd, 2000, 10:33 PM
#4
Fanatic Member
Just use the ocx/dll.
If I'm not wrong, the ocx/dll name is
Gif89.dll
Cheers,
Wen Lie
-
Nov 3rd, 2000, 10:55 PM
#5
Thread Starter
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|