How to get an animated GIF to function in V6
I have an animated dove that was too lazy to flap his wing when flying across the screen. Of course VB6 doesn't see animated GIF's, so got this one figured out by extracting the 15 individual GIF pictures and using the following routine he does fly across as I want him to do.
The trick is to save each picture as a "transparent" picture.
Option Explicit
Private Sub Timer3_Timer()
picAnimate.Top = 1 'set location from top of screen
'Static variables keep there value with each procedure call
Static currentpic As Integer
'Determines if the animation is at the last picture and starts
'at the beginning if so
If currentpic = 14 Then currentpic = -1
'moves to the next picture
currentpic = currentpic + 1
'moves the picture to the left
picAnimate.Left = picAnimate.Left + 55 'orig setting 400
'determines if image is off screen
'-3600's causes a slight delay in the animation coming back around
If (picAnimate.Left) > ScaleWidth Then picAnimate.Left = -1000 ' orig -3600
'changes the image to the new image
picAnimate.Picture = imgDove(currentpic).Picture
End Sub
Hope someone can use this
[mail id removed]