Animate Event Example for Visual Basic

Note: Also works with Access 95 and 97.

This example shows how the Animate event can be used to toggle the use of a button to start and stop the animation.

Private Sub LEADRasterView1_Animate(ByVal bEnable As Boolean)
  If bEnable = True Then
    Command1.Caption = "&Stop Animation"
  Else
    Command1.Caption = "&Start animation"
  End If
End Sub
Private Sub Command1_Click()
   If LEADRasterView1.AnimationEnable = True Then
     LEADRasterView1.AnimationEnable = False
   Else
     LEADRasterView1.AnimationEnable = True
   End If
End Sub