How do I change the color of the title bar in a Win Forms .Net app

G

Guest

How do I change the background color of the title bar in a Win Forms .Net app
without changing the color settings for all windows in the OS?

Thanks.
 
D

DotNet Coder

The easy answer is that you can't. The hard answer is that you *might* be
able to override the paint event or dig into the WinAPIs and do it that way.
There are some great articles for custom forms and such on The Code Project
(http://www.codeproject.com).

HTH,
~d
 
V

Vishnu-Chivukula

Hi Mike,

I beliveve this "might" not be possible (Unless someone has a real clever
hack for this.)

As a work around what you can do is remove the title bar and add a custom
control manually in place of the title bar. But you need to handle the
events like resize of the window on double click, move the window when
dragged by the title bar, etc..

Maybe,.. Maybe you can make a Win32 API and set it. ( My Guess).

HTH,

Happy Coding
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top