How to open a form multiple times? I have this event:
Form2 myForm = new Form2();
private void button_Click(object sender, EventArgs e)
{
myForm.Show();
}
When I debug my project with VisualStudio 2008, the first time I clicked on the button, the Form was Showed, but when I closed it, and I tried to open it again, i get an error similar to this: Impossible to access an eliminated object. Object Name: 'Form2'.
Can anyone explain this behaviour to me?