NCS Logo - Click for home page Northstar Developer Center
Platforms
All Platforms
.NET Framework (1.x - 4.x)
Active Server Pages
ASP.NET
C#
SQL Server
VB.NET
Visual Basic

Keywords
.NET Data Types
.NET E-mail
.NET Events
.NET Functions
.NET Object Programming
.NET System.Configuration
.NET System.Diagnostics
.NET System.IO
.NET System.Net
.NET System.Net.Sockets
Active Data Objects
ASP Architecture
ASP Black Belt
ASP Built-in Functions
ASP Built-in Objects
ASP Debugging
ASP Performance
ASP Security
ASP Syntax
ASP.NET Authentication
ASP.NET Controls
ASP.NET Data Access
ASP.NET Features
ASP.NET Master Pages
ASP.NET Page Events
ASP.NET Security
ASP.NET ViewState
Atom
Certifications
COM, DCOM, COM+
Data Access
E-Mail
Errors
Exporting Data
HTML Tips
IIS
Object-Oriented Programming
RSS
SQL
Uncategorized ASP Tips
VB API Programming
VB Forms
VB Syntax
XML

Book Support
Visual Basic 6 Bible
ASP Bible
ASP Weekend Crash Course
ASP.NET At Work
Creating Web Services

Developing Visual Basic Add-ins

Written by Eric Smith, Northstar Computer Systems LLC

Written by Steven Roman
Published by O'Reilly and Associates

</span> <span class="subheading">Table of Contents</span> <span class="text"> <ol>
  • Introduction
  • The Basic Components of an Add-in
  • Object Models
  • Menus and Toolbars
  • Debugging Add-ins
  • Overview of the Extensibility Object Model
  • User Interface Objects
  • Project-Related Objects
  • Form and Control Objects
  • Event-Related Objects
  • Code-Related Objects
  • Add-in Related Objects </ol> <span class="subheading">Our Review</span> <span class="text">

    In early versions of Visual Basic, some intrepid programmers reverse-engineered a way to add on extra tools to the toolbar. One notable product of that time was VBAssist from Sheridan Software. These tools were essentially a hack since the interface model was kept from we VB programmers. However, VB 5.0 changed all this by exposing the interface and creating a new interface called an add-in. The creation of good add-ins is still challenging, especially due to the fact that VB 6.0 changed much of the model. O'Reilly and Associates' book Developing Visual Basic Add-ins is a good, concentrated look at the process of creating add-ins for both VB 5.0 and VB 6.0. It's a small book (just over 170 pages) but the author covers everything you need to know about add-ins for both VB 5 and 6.

    The first chapter starts out looking like the beginnings of a tutorial, but it's more information about add-in architecture. There are a few key functions covered here, so you may want to highlight them for later use. In addition, information about both VB 5 and 6 is provided together, but the differences are tagged with icons in the margin. Be sure you read all the content before trying anything...you may start down the wrong path if you don't pay attention.

    The first part of the book (chapters 2-5) help you build, run, and debug a basic add-in. Chapter 2 covers the connection and registration process, which can be a bit tricky if you've not worked with other DLLs before. The steps are covered very clearly and there are plenty of screenshots so you can verify you're doing it right. Chapter 3 provides excellent coverage of the VB IDE object model. You need to understand the object model if you are to do anything useful that interacts with code or visual objects in VB. Chapter 4 gets into coverage of menus and toolbars, and chapter 5 covers the somewhat complicated process of debugging an add-in. The best advice I can offer is to change the option in VB to automatically save your project each time you run it. VB tends to crash a lot when debugging add-ins, and you don't want to have to start over.

    Part 2 (chapters 6-12) of the book goes into more depth on the entire VB IDE object model. The first part of the book was apparently designed to just give you a taste of the power of add-ins, but part 2 really goes deep into the objects. Chapter 7 covers all the user interface objects, which includes code panes and windows. There are lots of tips for manipulating these objects provided in this chapter. Chapter 8 covers all the project-related objects, such as library references, files and components like controls and libraries. You need this if you are creating add-ins that generate new files, such as the Class Builder Wizard does. Chapter 9 gets into the controls and forms in the visual designer portion of Visual Basic. Add-ins that set properties, move controls, or do other things to the visual part will make extensive use of this material.

    Chapter 10 covers events, which includes all the events from the add-in and the VB environment itself. There are a slew of events that will let you know when a file has been added to the environment, a control has been deleted, and so on. With a little bit of forethought, you can use these events and do various things with the project as they occur. The hardest part is knowing what the events are and when they trigger. Chapter 11 handles the code-related objects. Like the object models for other parts of VB, the code-related objects are even more extensive. These functions will come in handy if you want to manipulate code in the VB environment. Chapter 12 wraps up with some other information about the add-in related objects, some of which you had seen earlier in the book. There are some extra tips for using the objects in this chapter.

    One complaint about this book is that there are no complete examples provided in the book. All you get are snippets of code that you have to put together yourself. It would have been nice to see full examples in addition to the snippets.

    My other complaint about this book is that the code created throughout the book is not available on CD or from the publisher's or author's web sites. The code you write in the book is not extensive, but it's always nice to have a working model to start with instead of having to start from scratch.

    <span class="subheading">The Bottom Line</span> <span class="text">

    In closing, this book provides a concentrated and well-written look at the creation of add-ins. Even without complete examples, there is still enough information that, put with your imagination, will help you experiment with add-ins to create something really useful. With this book in your arsenal, you can finally create all those user-interface toys you've come up with.

    </span>

    Keywords: [ Book Reviews ]

    Publication Date: 4/30/1999