?
Solved

Change underline colour in Rich Text Box

Posted on 2001-09-04
3
Medium Priority
?
535 Views
Last Modified: 2008-03-03
Is there anyway to change underline colour in a RichTextBox, like Word does when the the AutoSpellcheck is on????
0
Comment
Question by:PeteD
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
ScottNero earned 200 total points
ID: 6453992
Unfortunately, the Microsoft RichTextBox seems to ignore the \ulc directive. In Microsoft Word you can read RTF files which have directives such as:

\ul\ulc7 (shows up with yellow underline)
\ul\ulc5 (shows up with green underline)

However, when loading this same thing into the RichTextBox, the underlines all come out as black, leading me to the assumption that it does not support this functionality.
0
 
LVL 2

Expert Comment

by:JanusFury
ID: 6454919
I believe that's because the GDI font system doesn't allow for special-colored underlines. Word does this manually.
It's not too hard to draw a colored underline yourself, however I don't know how hard it would be to do so in a richtextbox (Probably would require a LOT of subclassing).
0
 
LVL 2

Author Comment

by:PeteD
ID: 6491144
gotta end this....... thanks anyway
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question