如何使用.net的网页浏览器控制?
我在.net中使用winforms。我正在尝试使用 C++ 在网络浏览器控件中创建一个 html 页面。当我执行此操作时出现错误
webBrowser1->Document = "hi";
如何创建 html 页面并使用 Web 浏览器控件显示它?
i am using winforms in .net. I am trying to create a html page in web browser control using c++. I am getting error when i do this
webBrowser1->Document = "hi";
how to create a html page and display it using web browser control?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
webBrowser1->Document
需要 HtmlDocument,但你给了它一个字符串。另外,文档
property 是只读的(未定义 setter),因此无法设置。请尝试以下操作:
请注意,这使用
DocumentText
属性而不是Document
属性。webBrowser1->Document
expects an HtmlDocument, but you gave it a string. Also, theDocument
property is read-only (no setter defined), so it cannot be set.Try this instead:
Notice that this uses the
DocumentText
property instead of theDocument
property.