views:

346

answers:

4

I want to show html contents in my form. I tried to it with rich text box.

rtBox.Text          = body;

but it fails.

How to show html contents in rich text box..?? Note: i am using VS-2008 2.0

A: 

Is there a reason you don't want to use the WebBrowser control?

Rowland Shaw
A: 

RTF encoding is different from HTML. You cannot do this straight away. Rowland has rightly suggested WebBrowser control.

If not, then you need to write your own HTML to RTF converter or find something similar.

Nayan
A: 

If you want HTMl highlighted text int he RichTextBox you can use something like this: link From there you can make your own highlighting (based on the html elements) Here's also an example link2

PoweRoy
A: 

You can try the HTML control for .NET which I wrote: see http://www.modeltext.com/html/

It's a custom control to render HTML for Windows Forms, which doesn't use a web browser.

ChrisW