Microsoft KB Archive/180365

= INFO: Advantages of Hosting WebBrowser Control Instead of MSHTML =

Article ID: 180365

Article Last Modified on 7/18/2001

-

APPLIES TO


 * Microsoft Internet Explorer 4.0 128-Bit Edition
 * Microsoft Internet Explorer 4.01 Service Pack 2
 * Microsoft Internet Client Software Development Kit 4.0
 * Microsoft Internet Client Software Development Kit 4.01

-



This article was previously published under Q180365



SUMMARY
Using the Internet Client SDK, an application can take advantage of the features of Internet Explorer 4.0 by hosting either the WebBrowser control or MSHTML. Both of these provide many features. However, the WebBrowser control offers a lot more functionality and is more appropriate for the vast majority of applications, where browsing or rich content viewing are the primary objectives. The purpose of this article is to show the advantages of hosting the WebBrowser control as opposed to hosting MSHTML.



MORE INFORMATION
There is currently only one scenario where it is recommended that an application host Mshtml.dll rather than the WebBrowser control: Parsing HTML. The WalkAll sample in the Internet Client SDK demonstrates how to host MSHTML. The WalkAll sample also shows how to host MSHTML without the UI.

By hosting the WebBrowser control rather than MSHTML, you get the following functionality for free:


 * Inplace Hyperlinking. If you click a hyperlink, you navigate to the new document inplace rather than launch a new instance of Internet Explorer.
 * The ability to control viewing of rated sites.
 * Full support for security zoning.
 * Navigation. Simple Navigation methods rather than IPersist* interfaces for loading a Web document.
 * Full support of the window object from Dynamic HTML scripting.

For more information on hosting the WebBrowser control or reusing MSHTML, please refer to Internet Client SDK Help. The topic "Reusing the WebBrowser Control and MSHTML" discusses in detail how to host the WebBrowser Control and MSHTML.

