I have a Windows Form Application (Form1) that allow the user to open another Forms (FormGraph). In order to open the FormGraph App I use a thread that open it.
Here is the code that the thread is running:
private void ThreadCreateCurvedGraph()
{
FormGraph myGraph = new FormGraph();
myGraph.CreateCurvedGraph(...);
myGraph.Show();
}
My problem is that myGraph
closed right after it's open.
1) Does anyone know why this is happening and how to make myGraph
stay open?
2) After the user closed myGraph
, How do I terminate the thread?
Many thanks!