Hi:
I created 2 menus named: Form1, Form2 in the same solution,respectively.
so I created a reference of Form2 and a button in Form1.
Form2 myForm = new Form2();
Now, the button event is myForm.Show();
When I ran it, click the button I got Form2, so I closed the Form2, but the problem appeared if I clicked button again, it gave me such message:
can't access a disposed object named "Form2",
Object name:"Form2.ShowDialog"
But if I changed to:
myForm.ShowDialog, then no problem
what happened??
Thank you