Chapter 22 View contents of this chapter

Introduction

Today's lesson shows how to understand and use ActiveX controls. ActiveX controls add functionality to your application. Component software development cuts programming time and produces more robust applications, by allowing developers to assemble applications from tested, standardized components.

Visual Basic's supported object technology lets you borrow functionality from other applications that support ActiveX automation. For example, your VB application can create a Word document or an Excel worksheet by borrowing ActiveX technology from the outside applications. First you will understand how important ActiveX technology is and then you'll learn how to create your own ActiveX controls.

Adding ActiveX Controls

Remember that ActiveX controls are just additional controls you can add to the toolbox window and use for developing programs. Several controls come with VB, and you can find them by selecting Project, Components (or Ctrl + T), as you have done throughout the earlier days of this tutorial. Whether or not an application uses all the ActiveX controls loaded at the time of the compilation, you are required to distribute runtime ActiveX control files along with the project and its related files.

ActiveX controls exist for virtually any programming job you have. For example, If you want more control over sound than the included multimedia control offers, you can find many sound related controls on the internet.

The following figure shows the Components dialog box, which appears when you select Project, Components.

You've already seen this dialog box, because you have already added ActiveX controls to your toolbox. For example, you added the Common Dialog Box control in Chapter 16 - Common Dialog Boxes.

When you install VB, it adds several ActiveX controls to your system. If an ActiveX control is not shown by the Components dialog box, you can use the browse button to search your hard disk for ActiveX controls.



© Universal Teacher Publications        INDEX Previous Screen Next Screen