简体   繁体   English

IE中的WebBrowser控件

[英]WebBrowser control inside IE

I have a .NET ActiveX/COM Object which has a WebBrowser control (among other controls such has buttons, etc) inside it. 我有一个.NET ActiveX / COM对象,其中包含一个WebBrowser控件(以及其他控件,例如按钮等)。

This object seems to load fine, the buttons are displayed and working but, for some reason, the WebBrowser control doesn't show up! 该对象似乎加载良好,按钮已显示并且可以正常工作,但是由于某种原因,WebBrowser控件未显示!

Is there some limitation for this in IE (eg, is IE afraid of something recursive, etc.)? IE中对此有一些限制吗(例如,IE担心递归等等)? Is there a way that I can overcome it? 有办法克服吗?

Thanks in advance, 提前致谢,

Zubrowka 祖布鲁卡

FireBreath has a library called WebView that does this; FireBreath有一个名为WebView的库可以执行此操作。 I've tested it both in NPAPI based browsers and in ActiveX and it works just fine. 我已经在基于NPAPI的浏览器和ActiveX中对其进行了测试,并且效果很好。 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: 由于我不知道您在做什么,所以我无法告诉您您在做什么错...但是我可以向您展示FireBreath用于执行此操作的源代码:

https://github.com/firebreath/FireBreath/blob/master/src/libs/WebView/Win/WebViewWin.cpp 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. 这是在C ++中,但是您可能可以从中找到有用的东西。 I don't use .net in the browser -- too much overhead -- but theoretically the same principles should apply. 我不会在浏览器中使用.net -过多的开销–但理论上应该应用相同的原理。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM