IE 内的 WebBrowser 控件
我有一个 .NET ActiveX/COM 对象,其中有一个 WebBrowser 控件(以及其他控件,例如按钮等)。
该对象似乎加载良好,按钮已显示并正常工作,但由于某种原因,WebBrowser 控件未显示!
IE 中是否有一些限制(例如,IE 是否害怕递归等)?有什么方法可以让我克服吗?
提前致谢,
祖布罗卡
I have a .NET ActiveX/COM Object which has a WebBrowser control (among other controls such has buttons, etc) inside it.
This object seems to load fine, the buttons are displayed and working but, for some reason, the WebBrowser control doesn't show up!
Is there some limitation for this in IE (e.g., is IE afraid of something recursive, etc.)? Is there a way that I can overcome it?
Thanks in advance,
Zubrowka
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
FireBreath 有一个名为 WebView 的库可以执行此操作;我已经在基于 NPAPI 的浏览器和 ActiveX 中测试了它,它工作得很好。您可能想要这样做的原因有很多。
因为我不知道你在做什么,所以我无法告诉你你做错了什么......但我可以向你展示 FireBreath 用来执行此操作的源代码:
https://github.com/firebreath/FireBreath/blob/master/src/libs/WebView/Win/WebViewWin.cpp
这是用C++编写的,但你也许能找到一些东西从中受益。我不在浏览器中使用 .net——开销太大——但理论上应该适用相同的原则。
FireBreath has a library called WebView that does this; I've tested it both in NPAPI based browsers and in ActiveX and it works just fine. There are many reasons why you may want to do this.
Since I don't know what you're doing, I can't tell you what you're doing wrong... but I can show you the source code that FireBreath uses to do it:
https://github.com/firebreath/FireBreath/blob/master/src/libs/WebView/Win/WebViewWin.cpp
This is in C++, but you might be able to find something useful from it. I don't use .net in the browser -- too much overhead -- but theoretically the same principles should apply.