none
Change the color border form RRS feed

Answers

  •  The windows form's border color is a user's theme setting that the user selects and sets in the OS settings,  it is not something you can set for an individual windows form application.

    However,  there are ways to do it for individual windows forms.  One way you can do that in your application is to set the Form's BorderStyle to None and draw your own border and caption area.  Below is a link that has a few examples that TommyTwoTrains,  Mr. Monkeyboy,  and myself have posted for doing this.

     Customize Titlebar

     You can also take a look at these links.  They are 3rd party libraries that will let you customize the non-client area of a windows form.

    Winforms SkinFramework

    Szymon Kobalczyk's Blog - Drawing Custom Borders in Windows Forms

    CodePlex - Drawing Custom Borders in Windows Forms


    If you say it can`t be done then i`ll try it

    • Marked as answer by ahmeddc Saturday, November 11, 2017 11:48 PM
    Saturday, November 11, 2017 2:11 PM

All replies

  •  The windows form's border color is a user's theme setting that the user selects and sets in the OS settings,  it is not something you can set for an individual windows form application.

    However,  there are ways to do it for individual windows forms.  One way you can do that in your application is to set the Form's BorderStyle to None and draw your own border and caption area.  Below is a link that has a few examples that TommyTwoTrains,  Mr. Monkeyboy,  and myself have posted for doing this.

     Customize Titlebar

     You can also take a look at these links.  They are 3rd party libraries that will let you customize the non-client area of a windows form.

    Winforms SkinFramework

    Szymon Kobalczyk's Blog - Drawing Custom Borders in Windows Forms

    CodePlex - Drawing Custom Borders in Windows Forms


    If you say it can`t be done then i`ll try it

    • Marked as answer by ahmeddc Saturday, November 11, 2017 11:48 PM
    Saturday, November 11, 2017 2:11 PM
  • It can be done with DWM

    I translated into C#/VB.NET the code from MSDN at Custom Window Frame Using DWM

    but it is complicated...

    (in resume, it transforms the NC aera into client area and you can draw anything inside)

    It gives something like this (I added GradientFill()) =>


    Saturday, November 11, 2017 2:20 PM
  • It can be done with DWM

     Yep,  that is shown in the first link i posted too.

    If you say it can`t be done then i`ll try it

    Saturday, November 11, 2017 2:27 PM
  • Monday, April 29, 2019 11:08 AM
  • Hello,

    Is there a reason for replying with just an image to a older post?


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, April 29, 2019 11:18 AM
    Moderator