I've created a form with a scatterGraph on it. I'm trying to show the form in a thread that isn't the main thread.
I receive an exception "InvalidCastException" when my program performs ".ShowDialog()" method of the form.
The code looks like in the example below:
...
ThreadStart ts = new ThreadStart(tsm);
Thread t = new Thread(ts);
t.Start();
...
private void tsm()
{
FormWithScatterGraphOnIt f = new FormWithScatterGraphOnIt();
f.ShowDialog(); ***
}
...
The *** line throws the exception.
I've built my project in VS2005 C#.
Message Edited by 20 on
03-09-2008 09:16 AM