In this exercise, you will use the Web Browser Control in Visual Basic to create a simple Web browser application.
* To add a browser form to a project
- Start Microsoft Visual Basic and create a new Standard EXE application.
- Right-click the Project Explorer and from the Add menu, click Form .
- From the New tab, select Browser and click Open .
- Set the MDIChild property of frmBrowser to False .
* To set the startup object in the project - From the Project menu, click Project1 Properties .
- In the Startup Object box, select frmBrowser and click OK .
- Run the application and browse to:
localhost
- Stop the application and review the code provided in the buttonclick event of the toolbar.
Lesson Summary
When developing Network applications, you can use the TCP/IP protocol through the Windows Sockets API. To use other protocols such as HTML and FTP, you can use the WinInet API. The simplest solution is to use ActiveX controls, which provide prepackaged functionality that do not require you to program directly to any APIs.