471,599 Members | 977 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to change the color of a app's title bar?

Hello,

How do I change the color of the app's title bar (where you have the Close,
Minimize and Maximize buttons) in C#?

Mateusz
Dec 20 '05 #1
2 2889
Mateusz,

You could go and change the colors system-wide, but I don't think that's
what you want to do. To do it for an individual window, you will have to
custom paint the frame.

What you want to do is on the Form class, override the WndProc method,
and then handle the WM_NCPAINT message. This will notify you when the frame
needs to be redrawn. Then, you have to do it yourself, from scratch.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Mateusz Rajca" <Ma**********@discussions.microsoft.com> wrote in message
news:68**********************************@microsof t.com...
Hello,

How do I change the color of the app's title bar (where you have the
Close,
Minimize and Maximize buttons) in C#?

Mateusz

Dec 20 '05 #2
Another way to handle it would be to completely remove the titlebar and
to create your own titlebar that is docked to the top. It's a bit of
work, but then you have complete control of the design.

Dec 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Austin | last post: by
4 posts views Thread by Richard Trahan | last post: by
4 posts views Thread by ACaunter | last post: by
4 posts views Thread by Eric | last post: by
1 post views Thread by kenneth6 | last post: by
2 posts views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by

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.