Click here to Skip to main content
15,877,754 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys,
I've been looking for a method through which i can change the color of the title bar in my application.
Thanks in advance,

The correct approach to a different color of the title bar would be to apply a skin to the whole form. There are several toolkits for .Net that do that for you e.g.[^][^]
Share this answer
Espen Harlinn 26-Mar-12 18:28pm    
Wonde Tadesse 26-Mar-12 18:59pm    
ProEnggSoft 26-Mar-12 21:02pm    
Good pointers. +5
Have a llok at:Use the Free USkin Toolkit to Skin your Application[^]

Best regards
Espen Harlinn
Share this answer
Wonde Tadesse 26-Mar-12 18:59pm    
5+. Even though the example is VC++
Espen Harlinn 26-Mar-12 19:03pm    
Thanks, the author provides a small example in c# at the end of the article.
Wonde Tadesse 27-Mar-12 19:05pm    
Opps my mistake. :)
ProEnggSoft 26-Mar-12 21:00pm    
Good pointer. +5
Espen Harlinn 27-Mar-12 5:21am    
Thank you :-D
I think the following Code Project article
Winforms SkinFramework[^]
may also be helpful.
Share this answer
Sergey Alexandrovich Kryukov 26-Mar-12 21:15pm    
Yes, my 5.
ProEnggSoft 26-Mar-12 21:19pm    
Thank you very much.
Abhinav S 26-Mar-12 21:50pm    
ProEnggSoft 26-Mar-12 22:37pm    
Thank you very much.
Espen Harlinn 27-Mar-12 5:20am    
Nice article, 5'ed!
I would strongly recommend to give up with that. The library System.Windows.Forms does not offer such functionality, so you will need to use some elements of raw Windows API.

The problem is solved handling the Windows message WM_NCPAINT:[^].

Please see this discussion for some sample solution:[^].

Again, I do not recommend this trouble. You would pay by loosing compatibility with non-Windows systems. Did you know that you can run your .NET applications using Forms on many other platforms? You will loose this opportunity. More important, you will potentially loose compatibility with future Microsoft systems using SLR. One of Microsoft directions of development leads out of Windows. The Windows features you want to implement using those dirty tricks (legitimate in native Windows, which is going to go obsolete) will hardly be supported in future. Why bothering about them?

Share this answer
Akkywadhwa 26-Mar-12 16:14pm    
Could you please explain "WM_PAINT" with a demo project?
Sergey Alexandrovich Kryukov 26-Mar-12 18:45pm    
This is not "WM_PAINT", this is WMNCPAINT. Please see the second link for a code sample.
Or do you need WM_PAINT as well?
Espen Harlinn 26-Mar-12 18:30pm    
Good points :-D
Sergey Alexandrovich Kryukov 26-Mar-12 18:44pm    
Thank you, Espen.
Wonde Tadesse 26-Mar-12 18:59pm    

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