Search code examples
c#winformsheaderbackground-color

FormBorderStyle BackGroundColor


I want to change the Form Top Border BackGround Color. enter image description here

To change the Text , i do this.Text = "New Title"; To change the FormHeader BackGround color, is there a property that it recognises?


Solution

  • Option 1:

    1. Firstly change Form property formBorderStyle to none.
    2. Use panel and set as content of form content and change form backgroundcolor to color which you want to use for your border.
    3. Add a button on top-left side of for closing the form
    4. Make form draggable.

    Option 2:

    Form border and headers are OS drawn so you need to access low level api's to modify their colors.

    Look for code in: http://customerborderform.codeplex.com/