HI Folks,
I'm trying to understand form/control resizing behaviour but have run into an anomaly. I have an MDI test app that contains one MDI Child. This MDI Child (call it Child1) contains a TableLayoutPanel which, itself contains a couple of 'placeholder' labels (just to indicate control positions) and a button. When the button is clicked the Child1 form instantiates a completely separate form (call it Child2) and adds it to its 'Controls' collection ('showing' it and setting its child index to zero). The Child2 form also contains a TableLayoutPanel, a few 'placeholder' labels and a button to 'Close()' it. So far so good.
If I instantiate Child1 and click the button, Child2 is instiated and overlays Child1 as expected. At this stage I can maximize Child1 and return it to 'Normal' and all of the controls resize themselves as expected. In this case I can click the button on Child2, which will close it, and Child1 will reappear with all its controls resized correctly. However, if I instantiate Child1, maximize it, instantiate Child2, set Child1's size to 'Normal' and close Child2 by clicking its button then the TableLayoutPanel in Child1 is NOT resized and remains at its 'maximized' dimensions. Does anyone have any ideas why?
Sorry to be so long winded but this one's really puzzling me.
King regards,
RobDev
RobDev