Share via


Getting the "blue" themed border color

"What color can I use for borders - InactiveCaption is close, but doesnt work in Silver?"

System.Windows.Forms.VisualStyles.VisualStyleInformation.TextControlBorder

Prior to Whidbey, you would have to directly use the UxTheme API. I would recommend waiting for Whidbey rather than attempting the p/invoke yourself.

If you want a blue themed border around your RichTextBox, Dock.Fill it in a panel, set the panel's BackColor = TextControlBorder, and set the panel's Padding property to be new Padding(1). This will give the appearance of a one pixel blue border around the RichTextBox.