【发布时间】:2018-04-02 17:54:47
【问题描述】:
我在 webBrowser 控件中显示 HTML 文件 (Documentation.html) 的内容。 HTML 文件作为资源定位。
string htmlFile = Properties.Resources.Documentation;
webBrowser1.DocumentText = htmlFile;
Documentation.html 中有一张图片,可以在任何浏览器中正确显示:
<img src="Resources/Image.png">
不幸的是,HTML 文件的所有文本都正常显示,但图像却没有。
我可以将图像路径设置为资源(如 Properties.Resources.Image)或其他内容吗?
【问题讨论】:
标签: c# html winforms webbrowser-control