I found the problem, when you remove the graph form "Auto create forms" (in project options) and new the graph form in code and then close and free the graph form, the problem will happen, Instead let it be in "auto create forms" and when you want to show the graph use
frmgraph.show();
frmgraph.BringToFront();
and instead of closing the form use
Hide();