locked
Title Bar Color RRS feed

  • Question

  • Hi,

      How can i change the Title Bar Back Color of a particular form in C#?

    Thanks

      Jith

    Monday, July 17, 2006 2:54 PM

Answers

All replies

  • AFAIK you should create shaped form and in this way you could set any back color to your form. For more info check Shaped Windows Forms and Controls in Visual Studio .NET

    Otherwise Form's title bar is set on OS wide - from display properties in Control Panel.

    hope this helps

    Monday, July 17, 2006 7:21 PM
  • you may create custom shape form as the previouse response suggest

    but if you need to draw your custom titlebar  which is called drawing in non client are

    you need to overried WndProc and handle some Messages like

    WM_NCPAINT to paint your custom drawing and other message like

    WM_NCHITTEST, WM_NCLBUTTONDOWN, WM_LBUTTONUP 

    to work with titlebar buttons

    you can find some example of how to implement it in C++ and Visual basic

    sorry i dont know any example in c#

    Monday, July 17, 2006 10:03 PM