S
scottiedog
Hi,
I have child form attached to a parent form. It is declare in parent
form.
private frmChild child;
I also have an event to show the form and activate it.
if (this.child == null)
{
this.child = new frmChild();
this.child.MdiParent = this;
}
this.child.Show();
this.child.Activate();
No problem when called for the very first time to show the child form.
Problem occurs when the child from is closed and the called again to
show. "Cannot access a dispose object" error occurs on .Show() line.
I do not want to just hide the child form. Can I completely dispose
the form so that it can be called again immediately? How do I do
that? Or is there a way to make the .Show() work again?
Thanks.
I have child form attached to a parent form. It is declare in parent
form.
private frmChild child;
I also have an event to show the form and activate it.
if (this.child == null)
{
this.child = new frmChild();
this.child.MdiParent = this;
}
this.child.Show();
this.child.Activate();
No problem when called for the very first time to show the child form.
Problem occurs when the child from is closed and the called again to
show. "Cannot access a dispose object" error occurs on .Show() line.
I do not want to just hide the child form. Can I completely dispose
the form so that it can be called again immediately? How do I do
that? Or is there a way to make the .Show() work again?
Thanks.