Condividi tramite


Visual Basic Concepts

ActiveX Components

An ActiveX component is a unit of executable code, such as an .exe, .dll, or .ocx file, that follows the ActiveX specification for providing objects. ActiveX technology allows programmers to assemble these reusable software components into applications and services.

You can buy ActiveX components that provide generic services, such as numerical analysis or user interface elements. You can create components that encapsulate your own business transactions, and combine these with generic components. Reusing tested, standardized code in this fashion is called component software development.

Component software development using ActiveX technology should not be confused with object-oriented programming (OOP). OOP is a way to build object-based software components; ActiveX is a technology that allows you to combine object-based components created using many different tools. To put it another way, OOP is concerned with creating objects, while ActiveX is concerned with making objects work together.

For example, you can use an OOP tool such as Microsoft Visual C++® to construct a set of useful objects. These objects can be used and further extended by other C++ developers. If you package your objects in an ActiveX component, however, they can be used and further extended with any programming tool that supports ActiveX technology.

This chapter introduces the components you can build with Microsoft Visual Basic, and lists the portions of Creating ActiveX Components that apply to each.

Topics

They’re Not Just OLE Servers Any More

You can now create a variety of software components using Visual Basic.

Features of Visual Basic ActiveX Components

Lists key features Visual Basic provides for creating first-class components.

ActiveX Controls

Describes the main features of ActiveX controls created using Visual Basic.

ActiveX Documents

Introduces ActiveX documents, and explains how they are used in Internet-enabled applications.

Code Components

Code components provide objects other applications and components can create and use. This topic describes the features of Visual Basic code components.

Readers of this book should be familiar with the material in "Programming with Objects" and "Programming with ActiveX Components" in the Visual Basic Programmer’s Guide.