vb logo

 

Visual Basic Books
Home
Visual Basic Beginner Books
Visual Basic Database Books
Visual Basic ActiveX Books
Visual Basic Advanced Books
VB Internet Programming Books

Resources
Free Online Visual Basic Courses
Visual Basic Links
Add a Link
Subscribe to Mailing List

Visual Basic Books

Programming Components with Microsoft Visual Basic 6.0

Creating
ActiveX Controls

Why Create ActiveX Controls?

If ActiveX controls are basically dangerous to your health, why should you bother with them? After all, most of us leave strenuous mental pursuits to others. For the few who are ready to tame these intellectually challenging beasts, the advantages of learning how to create controls in Visual Basic outweigh the efforts required. Knowing the process involved in creating controls is good for you. It will make you a better human being, or at least a better user of third-party controls. You will gain a broader understanding of how controls operate. Think of it this way: controls and containers have to work together. Historically, Visual Basic has been a big consumer of controls, and Visual Basic developers have always seen things from the side of the container. In Visual Basic, however, you have a chance to see the world from the side of the control. Understanding the perspective of developers who create controls is a big step toward better and more efficient use of controls in general.

Beyond making better use of existing controls, you might want to extend those controls in new and innovative ways. For example, a particular control might have a basic functionality that you like, but you want it to work just a little differently. Visual Basic allows you to make such changes, but only if you know how to create controls. Imagine the possible benefits if you create a control for use in your project that can then be reused in other software projects at your company. You might decide to take the totally awesome control you created for your own software and market it as a reusable component for use in other people’s software. Who would have ever imagined that you could get this far in Visual Basic?

By structuring parts of your application as ActiveX controls, you make your software more maintainable since it is divided into multiple components with distinct interfaces. In addition, you also position your code to allow for one of the main benefits of object-oriented software: code reuse.

Types of ActiveX Controls

Visual Basic defines three basic models for control creation. You can:

  • Write your own control from scratch.
  • Enhance an existing control.
  • Assemble a new control from several existing controls.
next page....
Email us your comments:mail
Fax: 1(916)404-7719
©1999 Valassis Enterprises. All rights reserved.