Form.Closing Event fired on Minmize

T

terrence.jones

Hello All,

I have a modeless child form displayed on top of an owner form. I am
seeing the strange behavior of the modeless form's Closing event being
fired in reponse to the minimize button being pressed on the owner.

Pressing the minimize button of the child works as expected however.

The only messages I see received after pressing Minimize and before
entering the Closing event handler are:

WM_SHOWWINDOW (SW_PARENTCLOSING)
WM_SHOWWINDOW
WM_SHOWWINDOW
WM_WINDOWPOSITIONCHANGING
WM_WINDOWPOSITIONCHANGED
WM_WINDOWPOSITIONCHANGED
WM_SHOWWINDOW

I am at a compelete loss on this one, though as usually, it's probably
something simple.

Thanks.
 
G

Guest

I have a modeless child form displayed on top of an owner form. I am
seeing the strange behavior of the modeless form's Closing event being
fired in reponse to the minimize button being pressed on the owner.

I just ran the same thing, no problem - owner minimized and child did not
get closing event. Does the child window actually close after receiving the
closing event? Is the owner the startup object (or the arg to
Application.Run)?
 
T

terrence.jones

Yes to both questions. The child promptly closes and the owner is the
main startup object. I understand that this is not an expected
behavior so I expect that there is something about my child form that
is resulting in this behavior.

Thanks
 

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