Internet Explorer 9 RC停止我的WinForms WebBrowser控件在编辑模式下工作 [英] Internet Explorer 9 RC stops my WinForms WebBrowser control to work in editing mode

查看:155
本文介绍了Internet Explorer 9 RC停止我的WinForms WebBrowser控件在编辑模式下工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用 IHtmlDocument2.designMode 设置为On的属性将Windows Forms窗体上托管的WebBrowser控件切换到编辑模式,在安装Microsoft Internet Explorer 9 RC后突然停止工作.

Using the IHtmlDocument2.designMode property set to On to switch a WebBrowser control hosted on a Windows Forms form to editing mode suddenly stopped working after installing Microsoft Internet Explorer 9 RC.

问题:

有机会解决这个问题吗?

Any chance to fix this?

我已经尝试调整doctype或

I already tried to tweak with doctype or with the EmulateIE7 meta tag but without success.

(例如此项目)

2011年2月21日更新:

按照 Eric Lawrence 的建议,我调整了,以在设置编辑模式之前设置文档文本.

As Eric Lawrence suggested, I adjusted the "Zeta" example to set the document text before setting the edit mode.

不幸的是,我也没有设法切换到设计模式.

Unfortunately I did not manage to switch to design mode, either.

2011年2月24日更新:

部分讨论也在Eric的博客中进行.

更新2011-02-26:

我目前的经验是,HTTP URL和通过WebBrowser.DocumentText添加的内容的行为似乎有所不同.

What I currently eperience is that the behaviour seems to be different for HTTP URLs and for content that was added via WebBrowser.DocumentText.

最初的测试似乎证明了这一假设.

First tests seems to prove this assumption.

我现在将围绕这个假设构建一个解决方案,并在此处发布更新和概念证明.

I'm now going to build a solution around this assumption and post updates and a proof-of-concept here.

更新2011-02-26(2):

我现在已经使用内置的Web服务器构建了概念验证,我认为它也可以与IE 9很好地兼容.如果有人想

I've now built a proof-of-concept with a built-in web server which I believe is also working well with IE 9. If anyone would like to download and test whether it is working and give me a short feedback, I can clean up and release the source code for this.

更新2011-02-26(3):

还没有反馈,我仍然更新了 HTML编辑控件文章,并且在代码项目中进行演示.

No feedback yet, I still updated the HTML Edit Control article and demo over at the Code Project.

2011年3月16日更新:

自从Internet Explorer 9昨天发布以来,我们已经更新了我们的主要产品,以将其与集成Web服务器一起使用,如

Since Internet Explorer 9 was released yesterday, we updated our major products to use the idea with the integrated web server as described in the HTML Edit Control article.

经过近一个月的测试,我认为它运行良好.

After nearly a month of testing, I think it works quite well.

如果以后使用此方法确实遇到任何问题,请在此处发表您的评论,我可以进行调查和修复.

If you do experience any issues in the future with this approach, please post your comments here and I can investigate and fix.

推荐答案

昨天,Internet Explorer 9 RTM终于发布了.

Yesterday, Internet Explorer 9 RTM finally was released.

我对控件进行了一些细微的调整,但是基本上,集成小型Web服务器的想法似乎工作得很好.

I did some more tiny adjustments to my control, but basically the idea with the intergrated, small web server seems to work rather well.

因此,解决方案在此代码项目文章中:

So the solution is in this Code Project article:

Zeta HTML编辑控件
围绕Windows Forms 2.0 WebBrowser控件的小型包装器类

Zeta HTML Edit Control
A small wrapper class around the Windows Forms 2.0 WebBrowser control

这是唯一对我有用的解决方案.

This was the only solution that worked for me.

我希望可以回答我自己的问题并将我的答案也标记为已回答"吗?!?

I hope it is OK to answer my own question and mark my answer as "answered", too?!?

这篇关于Internet Explorer 9 RC停止我的WinForms WebBrowser控件在编辑模式下工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆