0
votes

anybody use .NET MDI containers much?

I've got an MDI Parent form that creates a bunch of smaller MDI child forms within it after a user clicks a toolbar. The child forms are all set to have the maximize button, and when clicked, they fill the parent container. But here's my problem:

Once you maximize one child, all of the subsequent child forms you open are maximized as well. Likewise, if you have several child forms open and maximized, clicking the shrink window button shrinks all of them.

Anyway to get around this?

Thanks, Elliot

1
It is normal for MDI child forms to all have the same WindowState. It is considered to be a user preference, so interfering with it would be an annoyance to users. Can you explain why you would like your application to behave in the way you describe?Antagony
When the parent MDI closes, all of the child forms' locations, sizes, and WindowStates are saved in the registry. Upon loading the next time, they are restored. The forms all restore properly, but some issues are occurring when a maximized form is restored and THEN an unmaximized form is restored.ElliotSchmelliot
I handle something similar in one of my apps and what I do is save either a Maximized value or Size and Location values whenever a child form is resized. That way it's clear what state to return to when restarting the app, and the restore sizes and location values remain intactAntagony
Ya, I just wish there was a compromise between 1. Having all the forms maximized all the time and 2. Having the option to maximize, as a user might want two forms open at the same time, half and half. Just makes the save/load unreliable.ElliotSchmelliot

1 Answers

0
votes

Sounds like this could break alot of things you would not want to break

http://social.msdn.microsoft.com/Forums/en/winforms/thread/4760c883-f789-4b91-8843-38863ad3add2

you might want to try a different approach