Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
405
ClientSize not correct when using style Office2007 and RoundedFixed.
posted

Hi,

I'm trying to make some dialogs look nice in my Application. Therefore I added am UltraToolbarsManager to the form and set:
Style = Office2007
FormDisplayStyle=RoundedFixed
on the ToolbarsManager.

It looks nice, BUT... the problem is that I'm "hosting" UserControls in it. The UserControls are designed with different sizes, so when the form hosts a UserControl it sets the ClientSize property of the form to the size of the UserControl. This works perfect for "normal" forms. But since the "nice styling" of the form (probably) is implemented without standard captionbar, borders etc and instead creates them by itself; the ClientSize and the Size of the form are the same!! Which of course cases the UserControl to not be totally visible.

Question: How do I figure out the current size of the caption, borders etc which I have to add to my clientsize?