如何在winform中显示html格式的内容(没有图像)?

New*_*Bie 7 .net html c# vb.net winforms

我想在我的winform应用程序中显示html格式的字符串.我应该使用什么控制?

Sam*_*ich 11

使用WebBrowser控件在WinForms应用程序中显示html内容.

您只能指定html内容:

Dim html As string  = "<span>my html content</span>"
webBrowser.DocumentText = html
Run Code Online (Sandbox Code Playgroud)

或指定html内容的路径:

webBrowserNotes.Url = "my-html-content.html"
Run Code Online (Sandbox Code Playgroud)