Setting the height of the caption bar

  • Thread starter Ruben van Engelenburg
  • Start date
R

Ruben van Engelenburg

Hi all,

Is there a way to set the height of the caption bar of a form? I know I
can retrieve the height using the SystemInformation class, but I'd like
to change it too to make it smaller. The only options I seem to have is
changing the border style to remove the whole caption bar, but that's
not exactly what I want.
Thanks in advance for any leads.

Best regards,
Ruben.
 
J

justin creasy

Hi all,

Is there a way to set the height of the caption bar of a form? I know I
can retrieve the height using the SystemInformation class, but I'd like
to change it too to make it smaller. The only options I seem to have is
changing the border style to remove the whole caption bar, but that's
not exactly what I want.
Thanks in advance for any leads.

Best regards,
Ruben.

Ruben:

Beyond changing the FormBorderStyle there is very little you can do to
easily customize the look and feel of the standard Windows Forms
caption bar. You can always try using either "SizableToolWindow" or
"FixedToolWindow" attributes which will make your caption bar smaller,
but remove the minimize and maximize buttons.

If this does not provide enough customization I would recommend
creating your own caption bar class. I have done this for a number of
applications and it's pretty straight forward. Create a panel, dock it
to the top, and add the buttons you want. The functionality for a
"Minimize", "Maximize", and "Close" button are all pretty simple. If
you do this then you'll have complete control over any attribute you
want and you'll be able to reuse it in any application you create. If
you need some help writing the code just post back here. Good luck!

~ Justin Creasy
www.immergetech.com
www.immergecomm.com
 
R

Ruben van Engelenburg

[snip]
If this does not provide enough customization I would recommend
creating your own caption bar class. I have done this for a number of
applications and it's pretty straight forward. Create a panel, dock it
to the top, and add the buttons you want. The functionality for a
"Minimize", "Maximize", and "Close" button are all pretty simple. If
you do this then you'll have complete control over any attribute you
want and you'll be able to reuse it in any application you create. If
you need some help writing the code just post back here. Good luck!

Hi Justin,

Thanks for your reply. I'm gonna go for your second suggestion and write
my own class for it. That offers me the most customization
possibilities, which is what I need.
Thanks again and if I walk into any problems I'll post back here.

Best regards,
Ruben.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top