R
Rainer Queck
Hi NG,
how can I size a mdi child to that it fits exactliy into "available" client
rectangle of a mdi container without setting its WindowState to Maximized?
On my MDI main form I have a ToolStrip docked to the right, which
dynamically changes its width.
I tried:
myForm.Width = this.ClientRectangle.Widht;
but then my form is wider then tha clientrectangle and the "close" button of
the form is not visible any more.
Next I tried :
myForm.Width = this.ClientRectangle.Widht - myToolStrip.Width;
still my form is wider then the remaining (client rect width - toolstrip
width) area.
By "try and error" I found that I get the wanted result by:
myForm.Width = this.ClientRectangle.Widht - myToolStrip.Width - 25;
But this can't be the only way to do it. I am sure there is a more
professional way to get what I want, right?
Thanks for hints and help
Rainer Queck
how can I size a mdi child to that it fits exactliy into "available" client
rectangle of a mdi container without setting its WindowState to Maximized?
On my MDI main form I have a ToolStrip docked to the right, which
dynamically changes its width.
I tried:
myForm.Width = this.ClientRectangle.Widht;
but then my form is wider then tha clientrectangle and the "close" button of
the form is not visible any more.
Next I tried :
myForm.Width = this.ClientRectangle.Widht - myToolStrip.Width;
still my form is wider then the remaining (client rect width - toolstrip
width) area.
By "try and error" I found that I get the wanted result by:
myForm.Width = this.ClientRectangle.Widht - myToolStrip.Width - 25;
But this can't be the only way to do it. I am sure there is a more
professional way to get what I want, right?
Thanks for hints and help
Rainer Queck