Why don't Menus, Status Bars, etc. Decrease Form Client Area?

  • Thread starter Thread starter Joseph Geretz
  • Start date Start date
J

Joseph Geretz

I laid out all my form widgets based on this.ClientRectangle. I expected
that when adding a Menu this would decrement from the Form's client area,
since that's what I'm used to from my years of VB6 development. But this
didn't happen. So is the difference between the Form size and its
ClientRectangle simply the width of the border and the title bar? Shouldn't
controls which 'dock' such as Menu and Status Bar reduce the size of the
ClientRectangle as well?

Thanks for your advice.

Joseph Geretz
 
I laid out all my form widgets based on this.ClientRectangle. I expected
that when adding a Menu this would decrement from the Form's client area,
since that's what I'm used to from my years of VB6 development. But this
didn't happen. So is the difference between the Form size and its
ClientRectangle simply the width of the border and the title bar?
Shouldn't controls which 'dock' such as Menu and Status Bar reduce the
size of the ClientRectangle as well?

You're correct about the ClientRectangle and it doesn't adjust for docked
controls, you need to do a few more calculations, sorry!
 
Back
Top