3

How do you get the ActiveCaptionText color when a window is maximized?

The color is correct when the window is restored:

alt text

But is the wrong color when the window is maximized:

alt text

How do you get the active ActionCaptionText?

Note: Same question for ActiveCaption, InactiveCaption and InactiveCaptionText.


It seems like there should be something with:

VisualStyleRenderer vs = 
   new VisualStyleRenderer(VisualStyleElement.Window.MaxCaption.Active);

label1.ForeColor = vs.GetColor(ColorProperty.TextColor);

But i can't make it work. it returns black for both Caption and MaxCaption:

alt text


References

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219

1 Answers1

1

It's an issue with Aero theme. It ignores that color in the title bar. Try Windows classic theme.

Mehrdad Afshari
  • 414,610
  • 91
  • 852
  • 789