Microsoft’s Visual Basic 6.0 Adds Professional Capabilities

Hands On: Visual Basic 6.0

Traditionally, the computer industry has viewed Microsoft Corp.’s Visual Basic (VB) more as a learning tool than as a serious application development program. However, new features added to the product, along with the inclusion of VB 6.0 in the Visual Studio 6.0 suite, lend credibility to Visual Basic as a professional programming environment.

VB 6.0 provides a wide assortment of new controls, advances in language constructs, and new object-oriented features. This version not only improves on the functionality of its predecessors, but also brings new Internet connectivity in the form of Internet Information Server Web classes, Visual Basic Generated DHTML, and Remotable DataSets using the new ActiveX Data Objects (ADO).

Some of these new controls provide important functionality, and some we think were just plain fun. The CoolBar, for instance, falls in the latter category. This little control allows you to create custom toolbar bands much like the Internet Explorer (IE) 4.0 quick-launch bar and navigation bar. The Image ComboBox is also a nice addition to the VB toolbox. As its name suggests, the Image ComboBox can display graphical icons as well as text. An example of this might be displaying a color swatch next to its name or a drive picture next to the corresponding letter.

As Microsoft Access users, we found that the Data Repeater control was like an old friend. By creating other controls within the Data Repeater and connecting it up to a data source, we achieved the equivalent of Access Continuous Forms. This displays multiple copies of an original form, each corresponding to a record.

VB is not only a container for widgets, but also a system for developing code to make applications. One of its previous shortcomings was its handling of textual data. We have always found that sifting through text files or returned form data can be a slow and cumbersome process in VB. However, the Split, Join, Filter and Replace functions go a long way to ease this task. Although not yet as robust as some of its more command-line-based brethren, we found these features to save both time and energy when we were programming.

One of the biggest advances in general programming theory, object orientation has been slowly creeping into VB over the last few versions. Microsoft introduced the User Defined Data Type (UDT) in VB 3.0. This fledgling object-oriented construct allowed us to create variables with subvariables such as employee.salary or car.color. One of the features that really rounds out VB 6.0 is the ability to pass arrays or UDTs as arguments to procedures or functions. We found that this basic programming enhancement affords a much simpler device for the movement of data and specific data access.

Developing Internet connectivity tools has become one of Microsoft’s main concerns of late, and this new direction can be seen in VB 6.0. WebClasses, ActiveX Documents Generated DHTML, and Remote Data Services are some of these new technologies. The Visual Basic WebClass is Microsoft’s answer to CGI. WebClasses are VB objects residing on an Internet Information Server (IIS) that respond to HTTP requests from HTML forms or other Internet-aware objects.

We thought one of the most interesting of these Internet-aware objects was the ActiveX Document. Using an ActiveX Document as a container, you can download a Visual Basic program, complete with form interface and class files, to a Web page. This ActiveX Document can then send requests to WebClasses on the IIS.

We found DHTML, on the other hand, not as much of a leap forward. The DHTML creation tools are not as full-featured as Microsoft’s FrontPage product, and although it gives the VB developer a familiar framework, the additional overhead for the pages was a significant trade-off. The big weakness of both the ActiveX Document and the DHTML page is the reliance on IE 4.0. This dependence makes these technologies decent choices for in-house Microsoft-specific applications, but seem unwise for Internet applications.

The new ADO, coupled with Remote Data Services, promise a full Internet-aware client/server solution with no dependence on IIS or IE 4.0. ADO is the new catchall interface to any OLE DB data provider, including relational and nonrelational databases, e-mail, text, graphics and any existing ODBC data source. ADO is firmly embedded within Visual Studio 6.0 as the de facto data standard. VB 6.0 includes many ADO-aware objects such as the DataGrid, List and Combo Controls, which we found simple to use for local data access.

We were able to easily create data consumers and data sources for use with ADO. This new data technology is one of the bright and shining promises of Visual Studio and VB in particular. But the developer should beware, for all great things come with a price. In this case the price is diligence. Remoting ADO RecordSets via the Internet was not well-documented and quite complicated. We would strongly recommend Microsoft’s Web site and the Data Access SDK as a place to start.

VB 6.0 lives up to its newfound status, and provides a better programming experience than previous versions. This new version has something to offer both the fledgling programmer and the seasoned enterprise developer.

Visual Basic 6.0
Microsoft Corp.
Redmond, Wash.
(800) 426-9400
Price: $549; Visual Studio Suite: $1,699.