Click here to Skip to main content
15,895,557 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi All,

I create a form, and set its features as below :
Form TheForm = new Form();
TheForm.FormBorderStyle = FormBorderStyle.SizableToolWindow;
The.ControlBox = false;

So that I get a form with an outlook of square type, and there is no form box(button) on the form, plus, I can draw the form to resize it.

Now, my question are below :
1. How can I change the color of the form head line ?
(the head line is the line which the form.text is put)
2. How can I put my specific boxes(buttons) on the head line of form ?

Please help me.

Thanks in Advance.
Posted
Updated 23-Jun-11 22:51pm
v2

1 solution

There is no simple way: In .NET you have no direct access to the non-client area of the form - which is what the title bar and the borders are.

There is some disucussion on this here: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/485fb4c5-8430-4cb5-8a4d-ccd7892e403b[^] - but don't expect it to be simple to do!

Google can also help, look for "customise NonClient area c#"[^]
 
Share this answer
 
Comments
Sports Kuo 24-Jun-11 3:48am    
Thanks of your information, so ......
[no name] 24-Jun-11 4:51am    
Good Call OriginalGriff.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900