VisualBASIC v5.0,
Professional Edition
Software Review by Mike Bianchi

TOC

I bought my first computer in 1986. It was an SVI328 manufactured by Bondwell and was already obsolete at the time (that's why it only cost $160).

BACKGROUND

This was one of those computers that had the CPU and keyboard integrated into a single unit. It had a Z80 processor, a whopping 64K RAM, no disk drive (IO was handled through an external tape drive that used standard audio cassette tapes) and no monitor (it included an adapter to use a TV as a monitor). Operation of this computer was accomplished by an integrated, proprietary version of the BASIC programming language (BASIC is an acronym for Beginner's All-purpose Symbolic Instruction Code.)

Like most (all?) programmers, I cut my programming teeth on the BASIC language. We've come a long way since then and so has Basic; it has evolved through several variations from BASICA and GW-BASIC (GW actually stood for 'Gee Whiz, look at all the neet stuff I can do now!') that were included as a part of DOS, through QuickBASIC that included a compiler and was sold separately (actually there was an earlier compiled version called CBASIC, but it was not well known or widely used). With the introduction of Visual Basic, a few years ago, the Basic language moved into the Windows environment. And now beyond, version 5 has moved into cyberspace with the inclusion of ActiveX controls for Internet applications.

SYSTEM REQUIREMENTS

Minimum: 486 processor with 16 Mb RAM running Windows 95 or NT 3.51; CD ROM drive, Windows compatible VGA monitor, mouse and 50 Mb free disk space for full installation.

Test System: for the purposes of this review, this software was tested on a Pentium with 16 Mb RAM running Windows 95 with a 6x CD ROM drive and about 600 Mb of free disk space.

INSTALLATION

Installation is as simple as any other Windows 95 application; either run the SETUP program from the installation disk or the Add/Remove Programs from the Control Panel. The process took 24 minutes on my system and went without a hitch -- ALMOST. I did a custom installation; I set it up to access the sample files and help from the CD to help conserve disk space. The printed documentation stated that a full installation required 50 Mb of disk space; this partial installation actually used more than 75 Mb.

PRICE AND AVAILABILITY

Microsoft's suggested retail price is $499 (upgrade from version 4.0, $199). I was not able to find any local software retailers that carried this product, although one had the Learning Edition available for $100. Searching through all my mountains of catalogs, I found only a few mail order vendors that had this product available at a price range of $435-450.

DOCUMENTATION

As has been my experience with most recent Microsoft products, Visual Basic's documentation leaves a lot to be desired. I prefer a hardcopy manual so that I can find what I need to know without having to leave my work screen. With on-line documentation, you can find help on using a feature that you may be having trouble with, but its very difficult to find out what features are available -- that's much easier using a printed manual. When working with programming languages, one of the first things I like to do is browse through the Language Reference. As of this writing, I have been working with Visual Basic for about two weeks; although I have found numerous referrals to the Language Reference, I have yet to locate it.

Everything I have been able to accomplish so far has been by trial and error based on my knowledge of previous versions of BASIC as well as other visual development environments.

INTERFACE

On opening the program, you are presented with a dialog offering several choices. The first tab gives the option of starting a new project and offers the several possibilities that you can start from. The second tab presents the standard folder list, allowing you to open an already existing project. The third and final tab lists your existing projects in the order of how recently they were last edited.

Figure 1: Interface showing Project window

If you have used any visual programming environments, you will immediately recognize the interface [Figure 1]. The main Project window fills the majority of the screen. It opens with a blank form if you selected to start a new project or the main form of the existing project that you chose to open, this is where you do the actual work of designing your forms. To the left of the screen is the Toolbox window that contains an icon for the most commonly used controls that you can add to your form. To place a control in your form, you simply click on the icon, then drag an outline over your form where you want to put it. You can add additional icons to this window.

On the right side of the screen are three more windows. At the top is the Project Explorer that shows a hierarchical view of your entire project. It also has buttons that toggle the view of the Project window between the visual Form view that is used to design the form and the Code view where you write the actual code that is attached to the events of the controls. In the center right of the screen is the Properties window where you can set the properties of the controls such as size, color, font characteristics etc. The final window in the bottom right corner is the Form Layout view which shows how the form, with its currently set size and position property settings will fit on the screen.

All of these windows can be closed, resized or moved around on the screen to create the working environment that you are most comfortable with.

USAGE

To put Visual Basic to the test, I wrote a fairly simple database access program. This program was not designed to be an efficient production application but rather to test the features of Visual Basic.

ODBC: The Open DataBase Connectivity is an API (Application Programming Interface) that defines a programming model that is database independent. This allows the development of applications that can access any database or database server that has an ODBC driver; as far as I am aware, the current versions of all database management systems are ODBC compliant.

Although databases are my area of specialization, my experience has been almost exclusively with dBASE. My first intention in designing this application was to create a database that set a relationship between a dBASE table and an Access table. However, when attempting to open the dBASE table, I got an error message saying that it was an incompatible file format. This is probably nothing more than a problem of configuration, but as yet I have not been able to locate the solution (see my comments above on documentation). I ended up using a flat Access table. The ODBC can just as easily use a query as a table, so I could have used a relational model, but decided not to in the interest of time and meeting the magazine deadlines.

As I mentioned earlier, adding controls to a form is as simple as click and drag. Once a control is placed, it can be moved or resized by dragging. Other properties such as text, font, color etc. can be set in the Properties window, and for precision, you can also use the Properties window to move or resize. The properties available in the window depend on which control you are working with. Linking a control to the database requires minimal programming, usually a single line of code is sufficient for each control.

I did encounter one problem with the placement of controls. The Z-order is what determines, among other things, which controls are 'on top' of others; that is, which controls are visible when they are placed in the same location. Notice in Figure 1 that the controls for the name fields are surrounded by a box, the Textbox and Label controls are 'on top' of the box. If you decide to use the box around the controls after the controls have already been placed, the box will cover the controls. On the menu is a selection for 'Order' that gives the choices 'Bring to Front' and 'Move to Back' (there is no in between as is found with some other similar programs). In this case, however, if the box is moved to the back, it will not always go all the way to the back, it will sometimes remain on top of the Labels. When this occurs, the Labels cannot be brought forward and the only work around I have found is to add duplicate Labels on top of the box. The same problem occurred when adding the tabs at the top of the form.

The other major problem I encountered occurred at run time. Everything went fine until a Textbox control encountered a record in the underlying database in which the linked field was blank. The program halted with an error message that said it was an invalid use of Null. I'm still working on that one. As a partial work around, I went back to the underlying table and replaced all empty text fields with periods; with the proper font selection this can be nearly invisible when displayed on screen. Trying this same technique on a date field, however, generates a data type mismatch error. This is obviously not an acceptable solution for a production application.

ActiveX: Regardless of what you think of Microsoft's software or their business practices, you have to admit that they are the world leader in coining new buzzwords. ActiveX is one of the latest cool things to say, but do you know what it means? Briefly, ActiveX is a network aware OLE server. It can be used to activate applications on a remote computer; either across the hall on a LAN or across the world on the Internet.

CONCLUSION

Microsoft's Visual Basic v5.0 Professional Edition is a powerful application development tool but is not as easy to use as it first appears. The learning curve can be steep, but if you are into programming it is worth the effort.


PUBLISHER Local regional offices
Microsift Corp
1-800-426-9400
www.microsoft.com
15710 John F Kennedy Blvd
Suite 800
Houston, TX  77032
(713) 986-4300
5080 Spectrum Dr
Suite 900E
Dallas, TX  75248
(972) 458-8086

We are in the process of organizing a Visual Basic SIG, it will probably be already up and running by the time you read this. For information, contact me.