New and Enhanced Controls
Controls are an integral part of the Visual Basic experience. As with the earlier versions of Visual Basic, new and enhanced controls are an important incremental improvement to the language.
Generally speaking, the ActiveX controls in Visual Basic are one of its hottest concepts. You can combine one or more existing controls or develop your own controls from scratch to create ActiveX controls deployable locally or over the Internet. You'll continue to hear a lot about ActiveX controls and their use on the Internet over the next few years. There are several new ActiveX controls in the Visual Basic package. First, I'll list the ones common to all editions of Visual Basic 6:
- The new ActiveX Data Objects (ADO) Data control provides an enhanced way to connect any data source to any data consumer and requires minimal coding. This control also allows on-the-fly changing of the data sources.
- The DataGrid control, which is similar to the previous DBGrid control, is Unicode-enabled and permits easy viewing and editing of recordsets.
- The DataList and DataCombo controlsenhanced versions of the older DBList and DBCombo controlsallow dynamic switching of the data sources.
- The new Hierarchical FlexGrid control is an updated version of the FlexGrid control and permits display of hierarchical recordsets created from several different tables.
- The new ImageCombo control is similar to the previous ComboBox control, with the added ability to add images to the list of items.
- The ImageList control now supports graphics files in the GIF format.
Next I'll list several new controls and enhancements to previous controls available in the Professional and Enterprise Editions of Visual Basic 6:
- The new CoolBar control lets you create the stylish new user-configurable toolbars you see in the Visual Basic IDE.
- The DTPicker control provides a drop-down calendar for foolproof user selection and entry of dates and times.
- A completely new way of organizing and grouping the display of data from data sources is provided by the new DataRepeater control. This control hosts TextBox, CheckBox, and other bound controls to provide views of a database similar to Access forms.
- The FlatScrollBar control provides a new type of flat scrollbar for your applications.
- The ListView control has been enhanced to allow the addition of subitems in its new ListSubItems collection.
- The new MonthView control provides a one-month calendar sheet to let the user pick dates and select ranges of dates.
- The MSChart control has been enhanced to allow binding directly to a data source.
- The enhanced ProgressBar control now supports smooth scrolling, and vertical and horizontal placement.
- The Script control is a powerful new feature that allows your applications to give the end user a "script" capability. This lets users interactively create Visual Basic, Scripting Edition (VBScript), Microsoft JScript, or other scripting functions that you define.
- The Slider control has been enhanced to support ToolTips and buddy windows.
- The TabStrip control has been enhanced to support several new features, such as control placement, hot tracking, flat buttons, multiselect, and highlighting.
- The TreeView control enhancements now provide row selection, hover selection, and check boxes.
Visual Basic 6 continues the pattern of enhancements found in previous versions. For example, you'll find that almost all visual controls now have a property for displaying ToolTips. (See Figure 1-8.) Also, more and more controls are enhanced for common features such as data-access binding, many kinds of Internet capabilities, drag-and-drop functions, and so on.
Figure 1-8. The ToolTipText property is now standard on most controls.
One of my favorite features is the capability of the controls containing graphics images to support the display of standard Internet graphics image types, such as JPEG and GIF, which are found all over the Internet, as shown in Figure 1-9.
Figure 1-9. JPEG and GIF images are supported in controls that display graphics.
Be sure to carefully check through the lists of properties, methods, and events for the controls as you get ready to implement themyou'll probably discover many other exciting and powerful new features!