views:

134

answers:

1

I am using CustomButton and CustomLabel derived from Button and Label. They have extra functionality that I need.

The visual difference is minimal but I don't know how .NET calculates Winforms disabled colors.

+4  A: 

You can pull the color from System.Drawing.SystemColors. For a label or text on a disabled control (for example) you want the equiv of COLOR_GRAYTEXT ( from GetSysColor windows API), which is System.Drawing.SystemColors.GrayText.

See the descriptions of system colors at the help for GetSysColor

Philip Rieck
Specifically SystemColors.GrayText
itowlson