1. Home
  2. Computing & Technology
  3. Visual Basic
Displaying HTML Documents
Using Internet Explorer
Adding IE to the Toolbox
 Topics
  From The Lesson
About Visual Basic on
IE in VB 6

 
About Visual Basic on
Opening multiple IE objects in VB 6

 
About Visual Basic
The ExtraGrid Demo

 
Microsoft MSDN
The AxImp Utility

 
Microsoft MSDN
IE Object Reference

 
Microsoft MSDN
Using IE Events in VB.NET

 

One thing you DO have to worry about is that most browser based applications use a web server. And if you do anything more than just display the information, the server is required. Again, we look at a whirlwind view of server based applications in the next chapter, but keep in mind that if your application can't access a web server, there might not be too much that it can do.

Web Browser Control

But there is more to the Internet Explorer object than the book presents. For example, there is a way to implement this object in your program other than the one presented in the book. The book describes how to add the SHDocVw.dll to the References section of Solution Explorer.

You can also add the IE browser to the VB.NET Toolbox. Here's how that is done ...

Right-click on the Toolbox to display the context menu, then select Add/Remove Items ... and click the COM Components tab in the next window. Browse down to Microsoft Web Browser and click the check box. You'll see a new component added to the section of the Toolbox that was expanded as you did this.

Web Browser Control

Doing it this way (instead of the way the book describes) gives you a slightly different result. You will discover that another DLL has been automatically added to the References in your program called AxSHDocVw.dll. This is the ActiveX Wrapper (that's what the "Ax" means) for the DLL and it allows the Internet Explorer COM object to be hosted in a VB.NET form. (The method described in the book gives you a new instance of the entire IE object which stays open even after you exit from your application.)

Here's how Microsoft explains it:

To host the ActiveX control, you must generate a wrapper control (which) contains an instance of the underlying ActiveX control. It knows how to communicate with the ActiveX control, but it appears as a Windows Forms control. This generated control hosts the ActiveX control and exposes its properties, methods, and events as those of the generated control.

Note that the properties are available to your program now just like any other Windows Forms control!

Next page >>>   Using IE in a VB.NET App
Page 1, 2, 3, 4
Explore Visual Basic
By Category
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2009 About.com, a part of The New York Times Company.

All rights reserved.