The magazine of the Melbourne PC User Group

Seeing the Basics: Visual Basic 6.0 has arrived
Tony Stevenson

This month's column focuses on Microsoft Visual Basic 6.0, the latest release of the language that, when it first appeared in the early nineties, revolutionised Windows programming.

Today, Visual Basic has evolved into a mature integrated development environment (IDE) that can be used to develop not only conventional Windows applications but also Dynamic HTML-based Web applications, ActiveX controls, and Active Documents, plus a lot more.

The HyperText Markup Language (HTML) has become the standard language for creating Web pages. Dynamic HTML (DHTML) is a series of enhancements to HTML. DHTML can be used to change the contents of a Web page dynamically after the page has been loaded, without needing to go back to the server first.

Three editions of VB 6.0

VB 6.0 is available in three editions: Learning, Professional, and Enterprise.

The Learning edition is suitable for anyone looking for an introduction to professional Windows programming for either the Windows or Windows NT platforms. A major component of this edition's documentation is the multimedia CD-ROM titled Learn VB Now, which consists of video lessons and associated practical work.

The Professional edition is for serious hobbyists or commercial developers interested in building robust Windows and Internet programs to run on stand-alone PCs or in client/server environments.

The Enterprise edition is designed for corporate programming teams. As such, it contains features like Microsoft's Visual SourceSafe 6.0 for controlling source code amongst team members, as well as a collection of database tools for visually designing enterprise-wide tables, views, SQL queries, stored procedures for Microsoft SQL Server 6.5+, Oracle 7.3.3+ databases, and so on.

I will focus on the Professional edition.

What's new in VB 6.0

In a short article like this, it's impossible to adequately cover all the new features in VB 6.0. The following list provides just a few examples of what's now available:

  • ADO (ActiveX Data Objects) is a new technology that's used for both local and remote data access. ADO objects, which can be created using the new Data Environment Designer, can act as data sources for objects placed on VB forms or in reports. Alternatively, they can be programmatically controlled at run time.
  • There's also a new ADO Data control that is OLEDB-aware. OLEDB is a collection of interfaces that applications can use to access information from both relational and nonrelational data sources.
  • Enhanced performance of applications and components via the use of the new Visual C++ 6.0 optimised native code compiler.
  • The new Data Report Designer is a report generator that can be used to produce traditional hardcopy reports as well as ones exported in HTML format. The latter type of report can then be conveniently distributed over the Net to a wide audience.
  • The inclusion of other new controls like the "DateTimePicker" control, which provides users with access to a drop-down calendar or the time (see Figure 1). This control represents a quick and straightforward way of entering dates and times within VB applications. Its "Format" property is used to change between the calendar and time settings. An example of another new control is "ImageCombo", which works like a normal combo box except that images can now be added to its list of items.
  • Some of VB's existing controls have also been enhanced with new objects, collections, properties, events, and methods. In addition, there are some new features affecting controls in general, for example, "Dynamic Control Addition". This means that controls can be programmatically added to, or removed from, forms at run time. For the latest information about both new and enhanced controls, refer to VB 6.0's online help. As well, there's a set of VB sample applications available which can be run to demonstrate the latest innovations in controls.


Figure 1. The new "DateTimePicker" control makes it easy to enter dates and times in a VB application


Figure 2. The new WYS/WYG HTML Page Designer in action

  • The new Dynamic HTML Page Designer offers a WYSIWYG (What You See Is What You Get) environment for creating dynamic HTML applications (see Figure 2). And it's possible to add HTML controls to the VB toolbox whenever they're required. Examples of some of the HTML controls available, and what they can be used for, include the "Button" control--for adding a command button to a page; "Submit Button" control--used on HTML forms for transmitting data back to the server; "Text Field" and "Text Area" controls--for incorporating single and multi line text input fields respectively on pages; and the "Hyperlink" control--for creating hyperlinks on pages.
  • The Internet Information Server (IIS) Application Designer for building dynamic browser-based applications consisting of both HTML and VB code.
  • Microsoft Developer Network (MSDN) CDs, which ship with all three editions of VB. These contain comprehensive online documentation about all aspects of VB development. Of interest too are the VB Programmer's Guide--a manual on VB programming techniques; the Component Tools Guide--information for developing and deploying ActiveX-based components; and the Data Access Guide--the steps involved in accessing data programmatically with VB
  • A range of new language features have been added to VB. For example, there's a set of new string functions, with FormatPercent, MonthName, and StrReverse being just three examples.
  • Enhancements to the Setup Wizard, which is now referred to as the Package and Deployment Wizard. Changes have also been incorporated into the Data Form and Application Wizards.

What to expect

The next few issues of "Seeing the Basics" will look at some of VB 6.0's key features in more depth. There'll also be reviews of a couple of VB 6.0 books to help you make the most of this latest release.

Reprinted from the November 1998 issue of PC Update, the magazine of Melbourne PC User Group, Australia

[About Melbourne PC User Group]