c# - 如何在 winform 中显示 html 格式的内容(无图像)?

标签 c# .net html vb.net winforms

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

最佳答案

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

您可以只指定 html 内容:

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

或指定 html 内容的路径:

webBrowserNotes.Url = "my-html-content.html"

关于c# - 如何在 winform 中显示 html 格式的内容(无图像)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7514328/

相关文章:

c# - 在 C# 中查看生成的源代码(在 AJAX/JavaScript 之后)

c#:在 my.settings 中存储大量数据

只有部分页面滚动的html布局

html - 如何对我嵌入的 youtube 视频进行 chromecast?

javascript - HTML5 Canvas 到 PNG 文件

c# - 解决我的服务层中的依赖关系

c# 在 gmail 中发送邮件未收到

C# 控制台应用程序响应 HTTP POST 请求

c# - TDD : Breaks all the existing test cases while refactoring the code

c# - 如何使用C#中的存储过程在Oracle数据库中插入数据?