On Mar 9, 1:40 pm, Ruben van Engelenburg <rub...@gmail.comwrote:
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