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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top