Dear All,
I have an mdi parent form with two chilldren. In the MDI parent form i have declare the chilldren like that:
public static Form2 frm2=new Form2();
public static Form1 frm1=new Form1();
and this is the Mdi Parent Form:
public static Parent frmparent =new Parent();
Now I am calling one Child from a menu of MDI parent like this:
Parent.frm1.Show();
The Form will be displayed fine but if i close the Form2 and call it again from parent's menu then i have the Exception:
System.ObjectDisposedException.
So the question is how can i have a variable which presenting a Form and be public all over the project everytime i want to open it?
Thanks
I have an mdi parent form with two chilldren. In the MDI parent form i have declare the chilldren like that:
public static Form2 frm2=new Form2();
public static Form1 frm1=new Form1();
and this is the Mdi Parent Form:
public static Parent frmparent =new Parent();
Now I am calling one Child from a menu of MDI parent like this:
Parent.frm1.Show();
The Form will be displayed fine but if i close the Form2 and call it again from parent's menu then i have the Exception:
System.ObjectDisposedException.
So the question is how can i have a variable which presenting a Form and be public all over the project everytime i want to open it?
Thanks