diff --git a/src/System.Windows.Forms/System/Windows/Forms/Controls/GroupBox/GroupBox.cs b/src/System.Windows.Forms/System/Windows/Forms/Controls/GroupBox/GroupBox.cs index c4f606b8446..9f2a64f3c9c 100644 --- a/src/System.Windows.Forms/System/Windows/Forms/Controls/GroupBox/GroupBox.cs +++ b/src/System.Windows.Forms/System/Windows/Forms/Controls/GroupBox/GroupBox.cs @@ -440,13 +440,27 @@ protected override void OnPaint(PaintEventArgs e) } else { - GroupBoxRenderer.DrawGroupBox( + if (FindForm() is Form form && form.ForeColor != SystemColors.ControlText) + { + GroupBoxRenderer.DrawGroupBox( + e, + new Rectangle(0, 0, Width, Height), + Text, + Font, + form.ForeColor, + textFlags, + gbState); + } + else + { + GroupBoxRenderer.DrawGroupBox( e, new Rectangle(0, 0, Width, Height), Text, Font, textFlags, gbState); + } } }