PC Review


Reply
Thread Tools Rate Thread

How to change (set) border color on a form in an application...

 
 
=?Utf-8?B?Q2xhZXNXZWRpbg==?=
Guest
Posts: n/a
 
      22nd Feb 2007
I want my application to have a special color on the Window forms borders.
Not the standard one (which the user has set up in his desktop-properties)...
How can I do this? I can change background/foreground colors etc and the
border also have some propereties, but not the color and shading...

Claes
 
Reply With Quote
 
 
 
 
Morten Wennevik [C# MVP]
Guest
Posts: n/a
 
      22nd Feb 2007
Hi Claes,

The border is drawn by Windows, but you can set FormBorderStyle to None and draw a border yourself in the PaintBackground event. However, removing the border also removes the ability to resize, move and a bunch of other handy features which you will have to code yourself.

Anyway, why do you want to change the Windows border color for a single application? This is one of the things a user should be able to define himself as a global setting.


On Thu, 22 Feb 2007 11:27:05 +0100, ClaesWedin <(E-Mail Removed)> wrote:

> I want my application to have a special color on the Window forms borders.
> Not the standard one (which the user has set up in his desktop-properties)...
> How can I do this? I can change background/foreground colors etc and the
> border also have some propereties, but not the color and shading...
>
> Claes
>




--
Happy coding!
Morten Wennevik [C# MVP]
 
Reply With Quote
 
=?Utf-8?B?dGpmZG93bnNvdXRo?=
Guest
Posts: n/a
 
      23rd Feb 2007
I have a similar situation where a client is determined to control the color
scheme for his application. He has a nice theme picked and then we have a
blue or whatever the user selects around it. I would also like to change the
color but don't want to have to recode the form with my own border (which
means code for dragging and resizing).

Tim

"Morten Wennevik [C# MVP]" wrote:

> Hi Claes,
>
> The border is drawn by Windows, but you can set FormBorderStyle to None and draw a border yourself in the PaintBackground event. However, removing the border also removes the ability to resize, move and a bunch of other handy features which you will have to code yourself.
>
> Anyway, why do you want to change the Windows border color for a single application? This is one of the things a user should be able to define himself as a global setting.
>
>
> On Thu, 22 Feb 2007 11:27:05 +0100, ClaesWedin <(E-Mail Removed)> wrote:
>
> > I want my application to have a special color on the Window forms borders.
> > Not the standard one (which the user has set up in his desktop-properties)...
> > How can I do this? I can change background/foreground colors etc and the
> > border also have some propereties, but not the color and shading...
> >
> > Claes
> >

>
>
>
> --
> Happy coding!
> Morten Wennevik [C# MVP]
>

 
Reply With Quote
 
=?Utf-8?B?Q2xhZXNXZWRpbg==?=
Guest
Posts: n/a
 
      5th Mar 2007
Well, in this case the users cannot change their settings (locket)...and as
the default windows-colors don't match the once in the app I would like to
change it just for cosmetic reasons!

"ClaesWedin"
--
Claes Wedin
Altcom AB


"Morten Wennevik [C# MVP]" wrote:

> Hi Claes,
>
> The border is drawn by Windows, but you can set FormBorderStyle to None and draw a border yourself in the PaintBackground event. However, removing the border also removes the ability to resize, move and a bunch of other handy features which you will have to code yourself.
>
> Anyway, why do you want to change the Windows border color for a single application? This is one of the things a user should be able to define himself as a global setting.
>
>
> On Thu, 22 Feb 2007 11:27:05 +0100, ClaesWedin <(E-Mail Removed)> wrote:
>
> > I want my application to have a special color on the Window forms borders.
> > Not the standard one (which the user has set up in his desktop-properties)...
> > How can I do this? I can change background/foreground colors etc and the
> > border also have some propereties, but not the color and shading...
> >
> > Claes
> >

>
>
>
> --
> Happy coding!
> Morten Wennevik [C# MVP]
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
change border automatic color dseimr Microsoft Excel Misc 0 20th Feb 2009 06:56 PM
Change color of the border.. Raul Microsoft Dot NET 0 15th Oct 2006 12:21 PM
how to change form border color? dpenny Microsoft Excel Programming 2 1st Feb 2006 01:44 AM
Change the border color used by Change Tracking =?Utf-8?B?SmltIFN0b2Frcw==?= Microsoft Excel Misc 1 20th Jan 2006 09:32 PM
How to change the default Border, Font Color, and Cell Color Elijah Microsoft Excel Misc 3 2nd Nov 2005 11:52 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:57 AM.