Animation Failure

TeeChart for ActiveX, COM and ASP
Post Reply
LundyJ
Newbie
Newbie
Posts: 6
Joined: Mon Dec 22, 2003 5:00 am

Animation Failure

Post by LundyJ » Sun Mar 07, 2004 8:00 am

Using VB6

With the following code, if the user closes down the program while the animation is running the program bombs with the following message: :(

Run-time Error '-2147418113 (8000ffff)
Method 'Execute' of object 'ISeriesAnimationTool' failed

Is there a way to abort out of the animation so that the program does not bomb?

Private Sub Command1_Click()

TChart1.Tools.Items(0).asSeriesAnimation.Execute

End Sub

Private Sub Form_Load()

'Set chart properties
With TChart1
.AddSeries scArea
.Tools.Add tcSeriesAnimation
.Series(0).FillSampleValues 50
.Legend.Visible = False
End With

'Set animation properties
With TChart1.Tools.Items(0).asSeriesAnimation
.Series = TChart1.Series(0)
.DrawEvery = 1
.StartAtMin = False
.StartValue = 0
.Steps = 10
End With

End Sub

Pep
Site Admin
Site Admin
Posts: 3278
Joined: Fri Nov 14, 2003 5:00 am
Contact:

Post by Pep » Mon Mar 08, 2004 11:12 am

Hi Lundy,

you can solve this adding a few lines to your code :

Code: Select all

Private Sub Command1_Click()
On Error GoTo procError
  TChart1.Tools.Items(0).asSeriesAnimation.Execute
  Exit Sub
procError:
  Exit Sub
End Sub

Post Reply