Link to home
Start Free TrialLog in
Avatar of Russ Suter
Russ Suter

asked on

Windows Forms show <a> tags as links

In a Windows Forms application, I have a RichTextBox control with the DetectUrls property set to true.

Using the following text:
Hello, and welcome to <a href="http://www.colgate.com">Colgate toothpaste</a>. Or if you prefer, just go to http://www.crest.com.
I get this result:
User generated imageWhat I really need is for it to render the string as a web browser would so it would look like this:
User generated image
I'd even be OK if it rendered both the <a> tag and the explicit URL both as links but that's not necessary. What I really need is a way to render the <a> tag as a link. Any idea how I can accomplish this?
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

you will need to use the web browser control instead of the rich text control
Avatar of Russ Suter
Russ Suter

ASKER

I'm aware that the WebBrowser control will do this. Unfortunately that's not an option. I need to figure out how to make a RichTextBox (or similar) control do this.
sorry: not possible.
Sorry, that's never an acceptable answer. It's always possible, even if I have to subclass the RichTextBox control myself. It seems that's what I'll be doing unless someone else can come up with an alternative.
ASKER CERTIFIED SOLUTION
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial