473,394 Members | 1,932 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Setting the height of the caption bar

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.
Mar 9 '07 #1
2 1428
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

Mar 9 '07 #2
[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.
Mar 10 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: W Dean | last post by:
Hi, I'm have a problem with defining the height of of two different div's (one containing text and another containing a picture) on a site I'm designing. Basically, the height appears to be the...
21
by: Michael Bierman | last post by:
Please forgive the simplicy of this question. I have the following code which attempts to determine the color of some text and set other text to match that color. It works fine in Firefox, but does...
3
by: Rennie deGraaf | last post by:
Is it possible to force adjacent block elements to have the same height, without specifying that height? In this page (http://pages.cpsc.ucalgary.ca/~degraaf/test/index3.html), I have a bunch of...
1
by: Colin Ward | last post by:
Hi. I have a popup modal form which gets part of its caption from code. The part of the caption which is determined from code is the name of the event. For example the caption would be "Add Year...
18
by: Dixie | last post by:
Can I set the Format property in a date/time field in code? Can I set the Input Mask in a date/time field in code? Can I set the Format of a Yes/No field to Checkbox in code? I am working on...
2
by: Daylor | last post by:
is there way to change the height of the caption ?
6
by: kode4u | last post by:
How to use python get my windows box's ip setting type? Dynamic ip, or static ip? If it's static ip, what's the exact value?
8
by: Andrus | last post by:
..NET 2 Winforms application. How to create new setting and set it default value in userSettings section of app.config file or overwrite existing setting value ? I found code below in this list...
6
by: slg | last post by:
Is there a simpler way to increase the mdi form caption height? I am following this article but not sure where should i change? I belive its most probably in the WmNCCalcSize TIA ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.