Non-UI Automation Under .Net
Posted: Sun Feb 01, 2004 2:11 pm
I am hoping to be able to create a Teechart with no UI for automation on my web server (create a chart from code and export it to a PNG file).
Instantiating an AxTeeChart.AxTChart object works fine, but whenver I try to access any properties/methods (like .AddSeries) it crashes with an "InvalidActiveXStateException".
I have narrowed this down to the fact that the chart appears to require a drawing surface. If I instantiate a form object from code, and set that as the chart's .Parent, it works fine. Unfortunatly, in a web app (and on a shared host), I can't use anything in the Windows.Forms namespace. I was hoping for a non-UI, "black box" solution.
Am I trying to do the impossible? Or is there a trick I can use to fool the chart into drawing itself without using Windows.Forms?
Instantiating an AxTeeChart.AxTChart object works fine, but whenver I try to access any properties/methods (like .AddSeries) it crashes with an "InvalidActiveXStateException".
I have narrowed this down to the fact that the chart appears to require a drawing surface. If I instantiate a form object from code, and set that as the chart's .Parent, it works fine. Unfortunatly, in a web app (and on a shared host), I can't use anything in the Windows.Forms namespace. I was hoping for a non-UI, "black box" solution.
Am I trying to do the impossible? Or is there a trick I can use to fool the chart into drawing itself without using Windows.Forms?