Microsoft
Internet Explorer
Windows FamilySearchWrite UsSupportProductsShop   Microsoft Home

Internet Explorer HomeFeature InfoDownload


Build your own browser using Internet Explorer's open and proven component architecture

You don't have to be a rocket scientist to create your own application based on Internet Explorer technologies such as the WebBrowser Control. It provides rich functionality that you can include in any program where you want to see elements of a browser interface or to include HTML navigation, History and Favorites management, HTML parsing and rendering, or any other feature of Internet Explorer. Because the WebBrowser control is registered as a control in the registry, you can include it in your programs by adding Microsoft Internet Controls to the toolbox in almost any development program you wish, such as Visual Basic.

Here's how to create your own Web browser using Internet Explorer 4.0 and Visual Basic 5:

  1. Launch Visual Basic 5.
  2. Choose Standard EXE from the New Project dialog box.
  3. Right-click Toolbox on the left side of the screen, and click Components.
  4. Check the box next to Microsoft Internet Controls, and click OK. Notice the two new icons in the toolbox for the WebBrowser Control and the ShellFolderViewOC.
  5. Make your form a bit larger so that you have more room to work.
  6. Select the WebBrowser control, and draw a box on your form covering approximately three-quarters of the bottom of your form. You have just created the area in your Web browser where the Web pages will be viewed.
  7. To make an Address bar, select the TextBox control from the toolbox, and draw a rectangular box above the WebBrowser control on your form.
  8. Add a button to your form by selecting the CommandButton control and placing it just next to your Address bar. You can change the caption Command1 to anything you want by typing a new caption.
  9. Finally, to make this work, double-click the button you just created, and add the following line of code: WebBrowser1.Navigate Text1.Text
  10. Press the Play button or F5 to start your new Web browser. Type any URL in your Address bar, press the navigation button that you created, and the content appears below.
Your new Web browser contains all of the HTML rendering capabilities of Internet Explorer 4.0.

You can also use the Internet Explorer 4.0 object model to expose only the functionality you want your users to have. For example, you've just created a browser with no Forward, Backward, or Refresh button. If this suits your needs, this would be fine. To add the other functionality, you only need to create a few more buttons on your form and add the following lines of code:

WebBrowser1.GoForward
WebBrowser1.GoBack
WebBrowser1.Refresh

You can experiment with the rest of the functionality inside the WebBrowser control so that you can build the browser that fits your needs.



Back to the topBack to the top

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.
Last updated: Wednesday, January 28, 1998
Photo credits: Phil Lauro/Index Stock, Richard Smith/Corbis