IE9环境系统中禁用了IHTMLDocument的WebControl

编程入门 行业动态 更新时间:2024-10-28 03:20:18
本文介绍了IE9环境系统中禁用了IHTMLDocument的WebControl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

大家好, 我使用WebBrowser控件开发HTML编辑器.在IE8兼容系统中可以正常工作,但在IE9中则不能. IE9禁用了WebBrowser控件,因此我无法编辑此控件.下面我显示了程序的示例代码. 我将WebBrowser控件拖到我的窗体中.

Hi All, I developing HTML editor using WebBrowser control. Which is work fine in IE8 compatible systems but not working in IE9. IE9 disabled the WebBrowser control because of this I''m not able to edit my this control. Below I shows the sample code of my program. I drag the WebBrowser control into my Form.

private IHTMLDocument2 doc; private void Form1_Load(object sender, EventArgs e) { webBrowser1.DocumentText = "<html><body></body></html>"; doc = webBrowser1.Document.DomDocument as IHTMLDocument2; doc.designMode = "On"; webBrowser1.Document.ExecCommand("Copy", false, null); webBrowser1.Document.ExecCommand("Paste", false, null); }

请提供解决此问题的方法. Hariharan A

Kindly give the solution for this issue. Hariharan A

推荐答案

已按照此链接中的说明进行尝试 stackoverflow/questions/4612255/regarding-ie9-webbrowser-control [ ^ ] 此MSDN链接也可能对您有帮助 msdn.microsoft/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation [ ^ ] Have tried as described in this link stackoverflow/questions/4612255/regarding-ie9-webbrowser-control[^] This MSDN link also might help you msdn.microsoft/en-us/library/ee330730%28VS.85%29.aspx#browser_emulation[^]

更多推荐

IE9环境系统中禁用了IHTMLDocument的WebControl

本文发布于:2023-11-11 17:01:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1579039.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:环境系统   WebControl   IHTMLDocument

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!