Teechart V6,0,0,4 with .NET

TeeChart for ActiveX, COM and ASP
Post Reply
SS
Newbie
Newbie
Posts: 27
Joined: Thu Nov 27, 2003 5:00 am
Location: Chicago

Teechart V6,0,0,4 with .NET

Post by SS » Wed Oct 06, 2004 2:40 pm

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

SS
Newbie
Newbie
Posts: 27
Joined: Thu Nov 27, 2003 5:00 am
Location: Chicago

Post by SS » Wed Oct 06, 2004 6:51 pm

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.

Post Reply