INFO: Advantages of Hosting WebBrowser Control Instead of MSHTML

Last reviewed: February 16, 1998
Article ID: Q180365
The information in this article applies to:
  • Microsoft Internet Explorer (Programming), versions 4.0, 4.01
  • Internet Client SDK, versions 4.0, 4.01

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.

REFERENCES

"Internet Tools and Technologies" under the "Reusing the WebBrowser Control and MSHTML" section in the Internet Client SDK online help: (http://www.microsoft.com/msdn/sdk/inetsdk/help/)


Additional query words: mshtml
Keywords : AXSDKWebBrowser
Technology : kbInetDev internet
Version : WINDOWS:4.0,4.01
Platform : WINDOWS
Issue type : kbinfo


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 16, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.