hide random home http://www.gateway2000.com/articles/review/vbasic/vbasic.htm (Amiga Plus Extra No. 5/97, 05/1997)

Visual Basic Professional 4.0

by Mark Davis

Several years ago, Microsoft released the first version of Visual Basic (hereafter referred to as VB) for Windows. Their goal was to introduce an easy to use programming language that still allowed users to access the power of the Windows operating system. They succeeded beyond their wildest dreams! Thousands of would-be programmers seized upon VB as an easy way to program without having to learn the intricacies of C++ or the arcane Windows SDK (Software Development Kit). Thousands of programs were developed using VB, and it became a standard tool for RAD (rapid application development). In the latest release of VB, even more new features have been added to make VB a tool suitable for all users, from the shareware programmer working out of his home to the corporate developer working on in-house programs for his company.

First of all, VB 4.0 has added support for Windows 95 and Windows NT. You can now create 32-bit versions of your applications that take full advantage of Windows 95's controls and features (for example, long file name support). For Windows 3.x developers, 16-bit support is also included in a separate 16-bit version of the product (to develop for both platforms, you must install both versions of VB on your PC). Conditional compilation of code is supported, however (this lets you create 16 and 32-bit versions of a program using the same code). In addition, VB 4.0 adds support for the new OCX (OLE custom control) format, which is a 32-bit replacement for the old 16-bit VBX (Visual Basic custom control) used in earlier versions of VB (you can still use VBX's in the 16-bit version of VB 4.0). OCX replacements for earlier VBX's are included in VB 4.0, and will be substituted for them if you wish whenever you open a project written in an earlier version of VB.

The best thing about OCX support in VB is that it's easier now to create applications that support OLE (Object Linking and Embedding). These OLE-enabled apps can be called from any other program that supports OLE, greatly enhancing the utility and functionality of those apps. VB itself is now an OLE container and controller, which makes it able to control the behavior of OLE automation objects. Another nice feature in VB 4.0 is the included support for Visual Basic for Applications (VBA), the macro language for the Microsoft Office suite. This support makes it easier to create apps and macros that can automate processes in Office (for example, inserting data into an Excel table automatically).

A new object browser in VB 4.0 can let you look at the classes, properties, and methods of both VB and any installed OLE objects on your system, which is a great help to programmers wishing to incorporate them into their projects. For database developers, VB 4.0 includes a new 32-bit version of the Jet database engine (this is the same engine that's used in Microsoft Access). Full ODBC (Open Database Connectivity) 2.0 support for external database access is also included, along with a new version of the Crystal Reports database report writer.

The documentation that's included in VB 4.0 is excellent. It consists of 3 large manuals (several hundred pages each in size) that cover every aspect of the product from basic programming to the syntax for each command. There's also a smaller manual included for the Crystal Reports database report writer. I applaud Microsoft for including such extensive printed documentation with VB; all too often, companies include minimal or no printed docs with their products, relying on online documentation instead in an effort to cut costs. In this case, at least, Microsoft got it right! VB does include good online help, although it's obviously not as good as the printed manuals. There's also a number of third-party books and other resources that support VB as well. Needless to say, there's plenty of help out there if (or when) you need it!

While there are a lot of new features in VB 4.0, there are a lot of things that haven't changed. For example, VB remains an interpreted, rather than a compiled language. Long a gripe of professional programmers, this means that the execution of VB programs will be slower than an equivalent program written in a compiled language such as C++. In addition, the runtime libraries that are required to be on your system in order to get VB apps to run get larger with every release of the product (for example, the 16-bit library is now over 900K in size!). VB doesn't support the development of multithreaded programs, either (an important omission in the new 32-bit multitasking world of Windows 95/NT). To be fair, though, many programs don't need the extra speed boost that these features can add, and will run fine using VB. Many of these limitations will also be addressed in the next version of VB (for example, it is said that you will be able to truly compile VB 5.0 apps).

While there may be a few limitations to Visual Basic, it remains the premiere development platform for the "rest of us"; that is, the people who don't have the time or desire to learn the ins and outs of "real" programming languages such as C++. Visual Basic works just fine for the majority of projects, and its inclusion into the Visual Basic for Applications macro language and the new Visual Basic Script language for Internet development ensures a long and healthy life for the language. If you're looking to learn Windows programming, you can't go wrong in learning Visual Basic first; the demand for good VB programmers should only continue to increase in the future!

Gateway offers this column to its readership as a service, but please note that it is not responsible for the accuracy or opinions of the author and offers no warranty either expressed or implied that the information will produce the desired result.

The information provided in this article is based upon the writers particular experience with certain equipment. Familiarize yourself with the requirements of your local and state electrical code and insure yourself that the work you plan to do does not require a licensed professional. If you decide to attempt to do the work yourself, always exercise extreme caution when working on electrical systems because accidents may cause serious injury including death and damage your computer. If you experience difficulty or do not understand the instructions, please consult a professional in your area.



[Products] [Global Site] [Tech Support] [Corporate Information] [The Cow Zone] [What's New] [Glossary] [Search] [Home]

[Gateway 2000]
Copyright © 1996 Gateway 2000 Inc. All rights reserved.
Please see our Legal Information. Please send feedback to Webmaster Central.