R – How to make a child form resize when its MDI parent form is maximized

mdiwinforms

I have an MDI form with child form.
I keep the MDI form in normal by default.
When I maximize the MDI, the child form is not maximized within it.
What do I need to do to make it resize along with its parent?

Best Answer

use a custom event - when the parent changes window state to maximized, it raises the event; child forms attach to the event and maximize themselves

of course this begs the question of "why would you want to do this?" since only the last child to maximize itself will be visible...