Visual Basic edition opens ActiveX for all users

One of the most difficult assignments for a PC programmer is to produce working ActiveX

Microsoft announced ActiveX as the replacement for Object Linking and Embedding, and
for months afterward hardly anyone outside the company could get an ActiveX control to
work. Microsoft's Developer's Studio gave plenty of examples, but it seemed only a sharp
C++ programmer could produce properly functioning controls.

Now Visual Basic 5.0 Custom Control Edition opens the ActiveX world to the estimated 2
million Visual Basic programmers--novices and experts. This standalone product was
designed to make ActiveX controls work with the Visual Basic language and development

Microsoft plans to bundle it with the full Visual Basic 5.0 Standard, Professional and
Enterprise Editions to be released later in 1997. It's available in beta form on the World
Wide Web site at and will be sold as a separate development tool.

How does Visual Basic perform in this role? Surprisingly well. To build a control, you
place control objects on a form, write some VB code and compile into a control. Simple
ones take less than an hour. Complex ones take longer, but the language is easy to
understand and use even for novice programmers.

The development environment is similar to VB 4.0, so experienced VB developers will
feel right at home. There are more than 20 standard controls from which you assemble your
custom control. Each has the usual selectable properties and events to give your control
an initial state.

Your custom control can be constructed with any feature found in an ordinary VB
application, such as multiple forms, pushbuttons, check boxes and data sources. The last
step is compiling the control. You can run it within the Visual Basic environment by
compiling it first or by interpreting it.

The environment contains standard Visual Basic debugging tools such as stepping though
execution, watching variables and setting break points. The editor offers some development
assistance, such as popping up the Properties window when you type a period so you can
select a property from the list.

As might be expected, there are a few rough spots. With my first compiles of the
example files, I got a cryptic message, ''Could not compile control.''Selecting Help
produced the message: ''Help not supported in Custom Control Edition.''Although I can
understand why Microsoft wouldn't want to incorporate Help files into a custom control,
there should be some help available in the development environment.

It was only by examining the files and compilation process that I discovered a missing
file, which prevented compiling. Little documentation came with the beta version, though
Microsoft plans to ship a comprehensive set of manuals with the shrink-wrapped product.

What does it mean to create your own ActiveX controls? First, any controls you make can
be put into use on a Windows-based Web site, powered by an ActiveX Web server and viewed
by an ActiveX-enabled browser. In effect, any application you write in Visual Basic can be

Second, you can share controls and information between ActiveX-enabled applications.
Few applications are ActiveX-enabled at this time, but you can imagine the advantages of
sharing controls with live data among members of a work group.

The rub, of course, is that this setup is all-Microsoft. At the moment, the only Web
server supporting ActiveX is Microsoft's Internet Information Server, and the only
ActiveX-enabled browser is the company's Internet Explorer.

Even if other products support ActiveX in the future, it still must be hosted on
Windows--and Microsoft wants you to use Windows NT Server. This isn't inherently bad, but
you should recognize it as a severe limitation on your choices.

Veteran VB users remember the heritage of ActiveX as the Visual Basic Custom Control,
or VBX. A VBX had to be written in C with a complex set of declarations and glue code for
registering the control in the VB development environment.

Microsoft provided shell examples in its Custom Control Development Kit, but it wasn't
easy to understand the code's purpose and get it to work with your control. In a sense,
it's a relief to operate at a higher level with a much smaller investment of time and
effort to produce a working control.

VB 5 Custom Control Edition is an instance of software's elusive silver bullet: the
reusable component. However, you might find it worrisome not to know what's going on

That's the aim of a software component, of course, but the implementation of ActiveX
beneath those components is very complex. You must place your trust in Microsoft's code to
rely on this product for applications.

Whatever your concerns are about component software or Microsoft in general, add Visual
Basic 5.0 Custom Control Edition to your programming tool kit. Webmasters and IS shops
should consider it.

Peter D. Varhol is chairman of the graduate computer science department at Rivier
College in Nashua, N.H.

Stay Connected

Sign up for our newsletter.

I agree to this site's Privacy Policy.