"Cor Ligthert [MVP]" <no************@planet.nl> wrote in
news:eg**************@TK2MSFTNGP03.phx.gbl:
Yuk,
If I have a panel in which I have placed a maximised form, what's
the easiest way to resize the form to automatically fill the
panel when the panel is resized? I am using VS 2003.
The easiest is the Dock property in every control (in this case
use it with your panel), the second one is the anchor property.
I hope this helps,
Still no joy unfortunately. I've tried docking fill, top, left,
bottom, right, anchoring anywhere from here to Timbuktoo, but the
form still gets left behind when the panel is resized. I would try
playing around with the windowstate property, but it seems to forget
that panel.controls.item(x) is a form once I've exited the procedure
that called it into being and added it to the panel controls
collection, even with option strict on.
One interim solution I'm considering is to stop resizing, which
rather defeats the point of having a frame-based layout.
--
Cheers, ymt.