Available in the LEADTOOLS Imaging toolkit. |
AnimationPause example for Visual Basic
Private Sub btnEnableAnimation_Click()
' Load all pages of an animated gif file.
LEAD1.Load "E:\LEADTOOLS\Images\eye.gif", 0, 1, -1
' Set properties for a scaled animation.
Lead1.AutoRepaint = True
Lead1.AutoSetRects = False
' Set the image display size to match the LEAD control.
Lead1.SetDstRect 0, 0, LEAD1.Width, LEAD1.Height
Lead1.SetDstClipRect 0, 0, LEAD1.Width, LEAD1.Height
' Allow a continuous loop.
Lead1.AnimationLoop = True
' Start the animation.
Lead1.AnimationEnable = True
'Set the middle frame as the start frame in the animation
LEAD1.AnimationFrameIndex = Int(Lead1.BitmapListCount / 2) - 1
End Sub
Private Sub btnTogglePauseAnimation_Click()
LEAD1.AnimationPause = Not LEAD1.AnimationPause
End Sub