Working with the WebBrowser Control in Visual Studio 2005.

1st: Please vote for this example on the site you found it on if you find it useful.

The article and example application is provided as-is.

Goal: To demonstrate working with the browser control by providing a "clone" of Microsoft's© Internet Explorer® 7 web browser.

Code Project Website link: Click Here

Link Example for article section:
JavaScript Document.External... ShowCalculator

Introduction

As many people know Microsoft has included a browser control with Visual Studio 2005.

The browser control is a managed wrapper around the internet explorer control found in earlier versions of visual studio (SHDocVW.DLL) and it exposes some functionality that was not always easy to get at, while at the same time leaving out some functionality that would have made the control truly great to work with.

The goal of this article and accompanying sample application is to show working with the new WebBrowser Control in Visual Studio 2005 by cloneing many of the features in Internet Explorer 7. It is not meant to replace your existing browser or be a 100% complete implementation of a browser, The features implemented are to show examples of working with various properties and events of the control and some idea's on what to do to write your own complete browser application. Every feature is not fully error checked as this is meant to be a "starting point" for working with the control and every user interaction possibility has not been addressed. That said with minimal effort you could make this example a complete browser based application. You will find some tips in the comments for certain events and routines on how to improve or use that routine in your own applications as well as some "stubs" such as download manager, phishing filter, rss reader, Document Explorer, Image Grabber etc.

This example was put together with out referencing the Active X (SHDocVW.DLL) directly. That said, It again needs to be pointed out that the browser control is a managed wrapper around the internet explorer control found in earlier versions of visual studio (SHDocVW.DLL) and you may find a mix of the 2 will best suit your purposes.

Credits:

  

  

Copyright 2007 - Thomas Maxwell
tmaxwell07@yahoo.com