A Tabbed WebBrowser Sample Project

Many new developers become excited when they discover the WebBrowser Control. They also want to couple it with tabs and make a tabbed webbrowser. One of two things happen, they end up with a poor webbrowser, one that isnĄ¯t really useable or they give up in frustration. This is a project containing several sophisticated classes to get you started. There are an awful lot of things to know.

The standard webbrowser control looks very complete to the novice and intermediate level programmer. ItĄ¯s not complete. For example, the standard VS2005 webBrowser , does not supply adequate navigational data to deal with Flash and Javascripts in new window situations, limiting the ability to control popups. There are good solutions available if one uses the extended events requiring a wrapper class which exposes these events. Such a class would be managed DLL control and behaving almost like the webbrowser. To my knowledge none have been developed in VB. This projects supplies such a DLL written in C# by jlandheer. An elaborate discussion of this control can be found here:

The name of the DLL is ExtendedWebBrowser2.DLL and it various aspects are discussed at length here: PostID=706113&SiteID=1


Supplied Classes

I built this DLL from his C# demo project found here:

and he deserves the credit for this control. The important thing is that this project has this dll and itĄ¯s used wisely as an example in a VB project. You can simply copy the dll to a place where you want to store in on your system and include it as a reference to your project.

ExtendedWebBrowser2.DLL ¨C think of this as a webbrowser control +

This project also comes with a rendered TabControl DLL that is the VS2005 Tab control only it looks far better than the standard control due to some additional rendering done in the DLL. This is especially true for its appearance on Vista.

The RenderedTabControl.DLL can be added to your toolbox by:

Main Menu | Tools | Choose Tool Box Items | Browse and adding the file.

For this project the tabcontrol was dragged from the toolbox and all tabpages were deleted You can see this tabcontrol in the last illustration at:

wbTabPage.vb is a dynamic tabpage class containing the ExtendedEvents Webbrowser. This is not a complete webbrowsing class, instead it is a framework to get you started. The demo allows you to create multiple tabs, standard navigation is possible via an address bar and link clicking and there are forward and back controls. Webbrowser tabs are deleted by selecting a tab and right clicking for an exit context menu.

I hope these are useful to you.

The entire project with DLLs and classes are located at: