The problem is that if this is your main form, then closing it will end your application. Which will close all child forms as well.
Why do you want to close forms, and which ones?
If it's your Graph to want to "refresh" then your "close and reopen" method could work:
private Graph myGraph = null;
private void RefreshMyForm()
{
if (myGraph != null)
{
myGraph.Close;
myGraph = null;
}
myGraph = new Graph1();
myGraph.FormClosing += new Graph_Closing;
myGraph.Show();
}
private void Graph_Closing(object sender, EventArgs e)
{
myGraph = null;
}
And just the graph will close and reopen.
But a better way is to add a Refresh method to your Graph form, and call that so that it can refresh itself.