all groups > dotnet windows forms > january 2008 >
You're in the

dotnet windows forms

group:

Group box border color


Group box border color Craig
1/28/2008 5:14:26 PM
dotnet windows forms:
I am trying to find the border color for a group box so I can create
some additional lines within the group box that match it. I can't find
any reference that says which system color it maps to. I have tried a
few different colors but some match on XP but not in Vista so if I can
Re: Group box border color Kevin Spencer
1/29/2008 7:45:04 AM
Because a Control's colors may be any colors, highlights and shadows must be
relative to the color of the Control. There is a class you can use to get
these colors: System.Windows.Forms.ControlPaint. See the following
reference:

http://msdn2.microsoft.com/en-us/library/system.windows.forms.controlpaint.aspx

--
HTH,

Kevin Spencer
Chicken Salad Surgeon
Microsoft MVP

[quoted text, click to view]

Re: Group box border color Herfried K. Wagner [MVP]
1/29/2008 2:04:10 PM
"Kevin Spencer" <unclechutney@localhost> schrieb:
[quoted text, click to view]

But this won't return the correct colors if the application has visual
styles enabled.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
AddThis Social Bookmark Button