简体   繁体   中英

.Net WebBrowser Control encapsulating anything else but IE?

We're using SHDocVw.dll for providing a web browser control to some of our users that access our system through a gadget they install on their computers. Now, that control encapsulates IE. Anyone knows of ways to let the users choose what browser to encapsulate?

EDIT - Clarifying: I'm interested in being able to encapsulate another browser. Not necessarily doing it with SHDocVw.

You cannot change which browser SHDocVw encapsulates. Sorry. SHDocVw is part of IE, it does not host IE. See this MSDN article for the IE architecture .

One possibility is to skip the web browser control completely and just start a new process running the browser that you do want. Here is a basic and simple example of how you would launch a firefox browser:

Dim p As New Process()
p.StartInfo.FileName = "firefox.exe" 
p.StartInfo.Arguments = "http://stackoverflow.com" 
p.Start()

There is a active x control for FireFox, so you could encapsulate that as well. Its not clear how well the XULRunners active x control supports IWebBrowser2 interface (note that xul runners says the active x is not complete.)

see:

https://developer.mozilla.org/en/XULRunner/What_XULRunner_Provides https://developer.mozilla.org/En/XULRunner http://nick.typepad.com/blog/2008/03/can-mozilla-be.html http://www.iol.ie/~locka/mozilla/control.htm

In short it will be a lot of work.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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