Selection Highlight Color

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Greetings,

I would like to change the selection highlight color in my RichTextBox, but
I can't find any documentation on it. Does anyone know how to do this?

Thanks,
Kevin
 
Hi Kevin,

The highlight color is determined by Windows (SystemColors.Highlight/HighlightText) and the only way to change it would be to change the system color (which the user probably won't appreciate).

If, however, you do want to change the system color, then you need to use pinvoke and call SetSysColors in User32.dll

http://www.pinvoke.net/default.aspx/user32.SetSysColors
 
Greetings Morten,

That's what I was afraid of. Well, thanks for clarifying. I don't think I
will change the system color. That would be a bit annoying. :)

Thanks,
Kevin
 
Back
Top