How to embed a browser object, other than IE, in a Delphi application

后端 未结 5 503
小蘑菇
小蘑菇 2020-12-04 10:29

Using the default TWebBrowser makes things easy to embed a web browser. Unfortunately the one that comes in by default is IE.

I\'m wondering how does one in

5条回答
  •  借酒劲吻你
    2020-12-04 11:06

    Over the last three years I have come across very little in the way of embedding Gecko in Delphi. One library that showed up fairly late in the game (for me) was the GeckoSDK project on SourceForge. I did a lot of work early on trying to make embedded Gecko work correctly in Delphi. Our first attempt at a Gecko rendering engine based internal "browser" was built using Delphi and Gecko 1.8. We have since moved on and our browser is now a XULRunner application. I have pieces of code laying around on my hard drive yet from that early attempt that I have not deleted yet.

    When Mozilla releases Gecko 2.0 I think it will become a lot easier to embed in Delphi. The XPCOM object system in Gecko makes it very difficult to embed because most everything returns an NS_RESULT. Strings especially were hard.

    edit: I just looked through my old bookmarks (almost all of which are dead) and searched for a new url for the Japanese language "bagel" browser based on Gecko and found it here,

    http://github.com/plus7/bagel/tree/master/Legacy.

    This is probably your best bet for some excellent code to start from. Unfortunately the comments in the code are Japanese and the author never responded to questions.

提交回复
热议问题