Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to show html formatted content (without image) in a winform?

I want to show html formatted string in my winform application. What control should I use?

like image 703
NewBie Avatar asked Sep 22 '11 11:09

NewBie


2 Answers

Use WebBrowser control to display html content in WinForms applications.

You can specify just html content:

Dim html As string  = "<span>my html content</span>"
webBrowser.DocumentText = html

or specify path to the html content:

webBrowserNotes.Url = "my-html-content.html"
like image 70
Samich Avatar answered Oct 24 '22 13:10

Samich


If you just want "simple" HTML formatting (e.g. underline, bold, text color, etc) you could use this custom control from Oscar Londono on code project: http://www.codeproject.com/KB/edit/htmlrichtextbox.aspx

like image 25
JBB Avatar answered Oct 24 '22 12:10

JBB