Partager via


Visual Basic Concepts

Other Internet Technologies in Visual Basic

In addition to DHTML applications and IIS applications, there are other types of Internet functionality you can add to your projects in Visual Basic, including:

  • ActiveX components that can be used on HTML pages, either as part of an IIS or DHTML application or not. ActiveX components include controls, code components, and ActiveX documents. Using some or all of these solutions, you can create highly functional Internet solutions for your business needs.

  • Internet extensions for Visual Basic applications. You can use special controls that provide some Internet-related functionality. These include the Internet Transfer control, the WebBrowser control, and the WinSock Control.

ActiveX Controls

ActiveX controls enliven and add power to your HTML pages. In addition to creating your own controls, you can use the Internet controls provided with the Professional and Enterprise editions of Visual Basic to extend standard applications with Internet technology. For example, you can use ActiveX controls on a Web page to add customized menus to your Web pages, add a scrolling banner you can use to present advertisements or important announcements, or add animated effects.

Using HTML and VBScript, you can include ActiveX controls on an HTML page, set their properties, call their methods, and handle their events.

For More Information   See the "Building ActiveX Controls" chapter in the "Creating ActiveX Components" book of the Component Tools Guide for information on developing ActiveX controls for your Visual Basic applications.

ActiveX Code Components

You can use ActiveX code components (.dll or .exe files) to add functionality to an HTML page on either the client or server. Code components on the client can offer an increase in speed, since users' commands do not need to be routed back to the server. Server components also have the benefit of being able to show user interface elements.

For More Information   See the "Creating an ActiveX DLL," "Creating an ActiveX EXE Component," or "Building Code Components" chapters in the "Creating ActiveX Components" book of the Component Tools Guide for information on developing ActiveX components for your Visual Basic applications.

ActiveX Documents

ActiveX documents integrate tightly with the other elements of your Internet or intranet site. You can use ActiveX documents in conjunction with DHTML applications, IIS applications, or HTML pages that are not associated with a Visual Basic Internet application. You can deploy these components so that users can navigate transparently between ActiveX documents and other pages in your application or Web site.

You might use ActiveX documents within your Internet applications for two reasons:

  • If you need to use the Visual Basic programming model rather than the programming model used in DHTML or IIS applications.

  • If you want to have control over the whole frame of the browser window, rather than just a part of it. When you display a Web page in the browser, the HTML you write to display the page lets you specify the appearance of only the page itself. You cannot write HTML to control the menu, the scroll bar, or any other part of the browser window. When you use an ActiveX document, you can control additional pieces of the window: You can add menus, toolbars, scroll bars, and other items. For example, if you want one page of your DHTML application to contain a custom menu, you might use an ActiveX document.

As is the case with the elements of an HTML page, ActiveX documents that are not installed on users' computers can be automatically downloaded when users navigate to them — and upgraded automatically if the versions on the server are more recent.

For More Information    See the "Building ActiveX Documents" chapter in the "Creating ActiveX Components" book of the Component Tools Guide for information on creating an ActiveX document.

Internet Extensions for Standard Applications

The Professional and Enterprise Editions of Visual Basic also include controls designed specifically to encapsulate Internet-related technology. These include:

  • Internet Transfer Control — Packages three common Internet protocols: HyperText Transfer Protocol (HTTP), File Transfer Protocol (FTP), and Gopher.

  • WinSock Control — Allows you to connect to a remote computer and exchange data using either the User Datagram Protocol (UDP) or the Transmission Control Protocol (TCP).

In addition, a WebBrowser control that is available when you install Internet Explorer 4.x allows you to run Web pages as part of a Visual Basic form.

For More Information   For information about the Internet Transfer control and the WinSock control, see "Using ActiveX Controls" in the Component Tools Guide. For information on using the WebBrowser control, see the Internet/Intranet/Extranet Services SDK on the MSDN Library CD, under the heading "SDK Documentation."