本文介绍了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
发布评论