Home All Groups Group Topic Archive Search About

MDI child form can't be closed from code

Author
9 Jun 2006 10:40 PM
swartzbill2000
Hello,
I am trying to close a MDI child form. The code
    childForm.Close()
will cause the child form to get its FormClosing event, but the child
form never sees its FormClosed event. All that happens is that the
child form gets minimized. How can I close the child form in code?
Bill

Author
9 Jun 2006 11:25 PM
Mehdi
On 9 Jun 2006 15:40:50 -0700, swartzbill2***@yahoo.com wrote:

> I am trying to close a MDI child form. The code
>     childForm.Close()
> will cause the child form to get its FormClosing event, but the child
> form never sees its FormClosed event. All that happens is that the
> child form gets minimized. How can I close the child form in code?

This is most probably because you've got some code somewhere that handles
the Closing event of your child form, cancels it and minimizes the form
instead. Hunt for it.