What's New in Visual Basic 4.0
The Microsoft List
Author: Microsoft

32-Bit Support

VB4 is a 32 bit application which enables developers to write applications that run on Windows NT 3.51 and Windows 95.

Conditional Compilation

A single source code tree can be used to create executables that target different environments, languages or platforms.

Creating OLE Automation Servers

Reusable development components can be created by building OLE Automation servers. The servers created can be accessed by any OLE Automation controller. You can also define your own properties and methods for the servers you create!

Creation of In Process OLE Servers

You can not use VB4 (32-bit only) to create in-process OLE Servers. An in-process OLE server is an OLE Automation server that can be run as a DLL in the same process as its calling application. The benefit of this feature above and beyond the existing ability to create OLE Automation servers is performance. Calling an in-process server can be significantly faster than making calls to an out-of-process OLE server.

Data Access Engine

VB4 introduces a new version of the Jet database engine (version 3.0) and Data Access Objects (DAO). Jet 3.0 provides better performance, programmability of security and relations, and cascading updates & deletes as well as several new properties and methods.

Forms as Callable Objects

Forms are first-class objects which provide their own public properties and methods that can be called from outside the form.

IDE Enhancements

Development environment improvements include Control Lock: Ability to "lock" controls and prevent them from being moved through the UI.
Control Nudge: Controls can be moved/sized one pixel or grid unit at a time using Shift/Ctrl & Arrow keys
Context menus for forms, controls and code modules at design time.
Tooltips for both the Toolbox and Toolbar

IDE Extensibility

The VB4 development environment can be controlled via an OLE Automation interface or extended by adding new menu items to an Add-Ins menu. The extensibility object model exposes enough information to enable Source Code Control and Forms Design Add-Ins.

Insertable Objects as Controls

Any OLE insertable object can be placed on the Toolbox and it's instances behave like controls. The instances provide the same UI negation with forms as is seen in other OLE containers.

Language Enhancements

With...End With

The With statement allows you to perform a series of statements on a specified object without requalifying the name of the object.

For Each...Next

For Each repeats a group of statements for each element in a collection (objects or an array)

Collection Object

The Collection data type enables an application to build it's own group of objects which can be enumerated over and which can be assigned keys.

Error Object

The Err object now includes a greater information when errors are returned fro OLE Servers. In addition, an OLE Server created in VB can Raise an error with a rich set of information.

Property Procedures

A property procedure is a way for an object to have data members (i.e., properties) for which code is executed when the property is retrieved or assigned.

Menu & Toolbar Negotiation

We now support full In-Place activation of compound document OLE objects on a form.

New Data-Bound Controls

More controls can now be easily bound to data using the Data control. Data Bound List and Combo
Data Bound Grid
Data Outline Control

New Editor Functionality

The code editor provides the following new features: Line Continuation Character
Setable Font and FontSize
Context menus (also know as right mouse button pop-up menu support).
Multi-line selection from cursor to cursor (i.e., full line is not necessarily selected).
Selection Bar

Object Browser

A hierarchical display of the classes, properties and methods of referenced objects along with descriptions and links to their native help files are readily available while the controlling application is being developed.

OLE Controls

OLE Controls replace VBX controls as the key custom control architecture for VB. VB4 will host VBX and OLE Controls in it's 16-bit version, and OLE Controls in it's 32-bit version and provide automatic migration at the users request for all controls shipped in VB.

Online Documentation

Visual Basic Books Online allows you to view, search,cross-reference, copy and print any of the topics in the Visual Basic documentation set. This includes the Programmer's Guide, Guide to Data Access Objects, Crystal Reports User's Manual, Help Compiler Guide, VisData online Help, DataManager online Help and BIBLIO online help.

Performance Enhancements

Background Compile:

background compile allows you to continue to compile your project during idle time. So, for example, when you start your application, VB compiles just enough to bring up the first form. At that point, VB continues to compile the rest of your project during idle time.

Demand Compile:

Demand compile allows VB to only compile the items needed for any given point of executing your application. For example, to start your first form, VB does not need to compile the entire project. It only compiles those elements necessary tot display the first form. From this point on, Visual Basic compiles the portions of your project that it needs as you execute different areas.

Background Project Load:

This allows control to return to you very quickly after choosing to load a project. VB sill continue to load the project in the background, while you work. Files or forms that you need will be loaded when you choose them, so you can be more productive.

Resource Files

Resource files added to a project provide for no-recompile customization and localization of an application.

Windows 95 Features

Controls:

This release contains controls that give you access to the standard Windows 95 controls. These are located in COMCTL32. OCX and RICHTX32.OCX. Note that both of these controls libraries will only function on 32-bit operating systems (Windows 95 and Windows NT 3.51) The libraries contain the following controls: ImageList, ListView,RichText, TabStrip, Toolbar, TreeView,ProgressBar,StatusBar and Slider

Drag-and-Drop Support

You can now select files in the shell or Explorer and drop them into the Visual Basic Project window. You can also select custom controls and drop them into the Toolbox. Lastly, you can select objects and drop them into the OLE container control at design time.