Resize event not called when closing maximized form 
Author Message
 Resize event not called when closing maximized form

Hi there,

I was dubugging my MDI program and noticed that If i had a number of forms
open, went to view them maximized, and then closed the maximized form... the
form underneath did not get a resize event called so.... my controls relying
on this event to resize to fit the window are the same size they were behind
the top maximized window.

If you can understand this... then give yourself a pat on the back... but
also I would appreciate a few little words of advice.

Thanks
Julian.



Sun, 15 Oct 2000 03:00:00 GMT  
 Resize event not called when closing maximized form

Umm... I could be missing something, but why would closing a form trigger a
Resize event?

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/
Please direct your programming questions to the newsgroups.

Quote:

>I was dubugging my MDI program and noticed that If i had a number of forms
>open, went to view them maximized, and then closed the maximized form...
the
>form underneath did not get a resize event called so.... my controls
relying
>on this event to resize to fit the window are the same size they were
behind
>the top maximized window.

>If you can understand this... then give yourself a pat on the back... but
>also I would appreciate a few little words of advice.



Sun, 15 Oct 2000 03:00:00 GMT  
 Resize event not called when closing maximized form

Quote:
>Try it - Resize is allways triggered on close - except when the MDI child
>windows are maximized... then it is not.

I did try it, and I guess I still learn something new every day. But in my
case, the MDI parent *only* triggered a Resize event when its children *are*
maximized, and didn't fire the event when the children were normal. It also
fires a Resize event when one of its children is maximized and
"un-maximized".
Can you use the form's QueryUnload event instead?

--
Ben Baird, MVP
Microsoft SiteBuilder Network Level 2
Visual Basic Thunder, v. 2.0
http://www.{*filter*}highway.com/~psy/
Common Controls Replacement Project, Official Member
http://www.*-*-*.com/
Please direct your programming questions to the newsgroups.



Sun, 15 Oct 2000 03:00:00 GMT  
 Resize event not called when closing maximized form

Try it - Resize is allways triggered on close - except when the MDI child
windows are maximized... then it is not.
I don't know why this is so - but I have put a debug trace through, and was
suprised to see it wasn't.

Julian

Quote:
>Umm... I could be missing something, but why would closing a form trigger a
>Resize event?

>--
>Ben Baird, MVP
>Microsoft SiteBuilder Network Level 2
>Visual Basic Thunder, v. 2.0
>http://www.{*filter*}highway.com/~psy/
>Common Controls Replacement Project, Official Member
> http://www.*-*-*.com/



Mon, 16 Oct 2000 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. How to hide the maximize/restore and close-button on a maximized form

2. Bug in Calling Form Resize Event

3. Visual Basic - Trapping Minimize/Maximize/Close Events (from the window's buttons)

4. Form Close Button Does Not Close the Form

5. Form.Close method does not fire Form_Closing or Form_Closed events

6. How resize a datagrid when maximize form?

7. How to disable minimize/maximize/resize on an MDI Form

8. Closing one form from another and resizing the entire form at runtime

9. How to hide the minimize, restore and close button on a maximized form

10. Do I Find or Write the new Form Events (Activated,DeActivated,Closing,Closed)

11. Form close event occurs before lost focus event

12. event procedure that prints a report and maximizes a form

 

 
Powered by phpBB® Forum Software