Page 1 of 1

Teechart V6,0,0,4 with .NET

Posted: Wed Oct 06, 2004 2:40 pm
by 9080016
I'm attempting to use V6.04 with a .net application. I've included a referrence to the TeeChart6.dll and created the objects as:

Dim objChart As New TeeChart.TChartClass

However when I try:
objChart.Legend.Visible = False

I get an error message:
Run-time exception thrown : System.InvalidCastException - QueryInterface for interface TeeChart.ITChart failed.

Any idea on what I'm doing wrong. I'm new to .NET and converting a .asp/vb6 application to .NET. I don't use the Teechart.Net version because we lose many of the features we use in v6.04

Posted: Wed Oct 06, 2004 6:51 pm
by 9080016
I figured it out. I needed to set the @Page ASPCompat = true to set it to STA.

Also needed to :
Dim objChart as TeeChart.TChartClass
objChart = New TeeChart.TChartClass

On to the next issue.