MDI child form can't be closed from code

S

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
 
M

Mehdi

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top