Hi Lionel,
Control class provides event Layout that is meant to be used exactly in this
scenarios. The event is fired whenever a control needs to reposition its
children elements.
In your form you can handle this event overriding the OnLayout method. Don't
forget to call the base class in order the form to fire the event so other
interested parts can have chance to process it.
HTH
--
Stoitcho Goutsev (100) [C# MVP]
"Lionel" <Li****@discussions.microsoft.com> wrote in message
news:19**********************************@microsof t.com...
In my forms constructor I have the following:
this.WindowState = FormWindowState.Maximized;
I then try to size some controls based on the size of the maximized form's
client area:
SomeControl.Height = (this.ClientSize).Height;
But this never returns the proper value i.e. (this.ClientSize).Height is
always too small (around 230 pixels). What is going wrong?