AutoAnimate Example for Visual Basic

Note: Also works with Access 95 and 97.

This example gets information about an animated file, uses the information to position the LEAD control, and plays the animation as it loads the file.

Dim RasterIO As New LEADRasterIO
' Force continued looping after the file loads.
LEADRasterView1.AutoAnimationLoop = AUTOANIMATIONLOOP_INFINITE
' Get information about the file we will load.
RasterIO.GetFileInfo LEADRasterView1.Raster, "d:\lead14\dist\images\eye.gif", 0, 0
' Exit if this is not an animated file.
If RasterIO.InfoAnimation = False Then
   MsgBox "Not an animated file", 0, "Error"
Else
  ' Set properties for playing the animation as is loads.
  LEADRasterView1.AutoAnimate = True
  LEADRasterView1.AutoRepaint = True
  ' Load the animated file.
  RasterIO.Load LEADRasterView1.Raster, "d:\lead14\dist\images\eye.gif", 0, 0, -1
End If