Animated GIF in a Layout Control 

             
 
Dim TimerCount

Dim Imgdir
    Imgdir = "http://buster/sbn/animgif/"

Sub Layout_OnLoad() 

    Call Ld(SI1, "bgrnd1.gif")
    Call Ld(SI1, "bgrnd2.gif")
    Call Ld(SI1, "bgrnd3.gif")
    Call Ld(SI1, "bgrnd4.gif")
    Call Ld(SI1, "bgrnd5.gif")
    Call Ld(SI1, "bgrnd6.gif")
    Call Ld(SI1, "bgrnd7.gif")
    Call Show(SI1,"bgrnd1.gif")

End Sub 

Sub Ld (obj, pic)

    Set lobj = obj
    lobj.LoadPictureToCache = Imgdir + pic

End Sub
Sub IeTimer1_Timer()

TimerCount = TimerCount + 1

    Select case (TimerCount)
        Case 1 Call Show(SI1,"bgrnd1.gif")
        Case 2 Call Show(SI1,"bgrnd2.gif")
        Case 3 Call Show(SI1,"bgrnd3.gif")
        Case 4 Call Show(SI1,"bgrnd4.gif")
        Case 5 Call Show(SI1,"bgrnd5.gif")
        Case 6 Call Show(SI1,"bgrnd6.gif")
        Case 7 Call Show(SI1,"bgrnd7.gif")
        Case 8 TimerCount = 0
    End Select

End Sub

Sub Show (obj, pic)

    Set lobj = obj
    lobj.picture=Imgdir + pic

End Sub
    Case 8 IeTimer1.Enabled = 0
       

 

 

 

1997 Chris Bayes For ClubSBN. All Rights Reserved.