Chapter Three

Variables

Visual Basic's new string functions reduce the need for the bag of string-handling routines most of us have been carrying around since BASICA. Common string tasks such as removing spaces, replacing tabs, and breaking strings into tokens are now handled by the Visual Basic language.

Visual Basic 6 also provides controls for selecting and displaying dates in calendar and list box formats. The Calendar and DTPicker controls make conveying date information to users easier and saves you from a lot of handwork creating attractive ways to display dates.

This chapter covers the uses of these new features and discusses some tricks for working with variables that are not new to this version of Visual Basic, such as using Variants and simulating unsigned integers when working with the Windows application programming interface (API). Also covered in this chapter are working with predefined constants and creating user-defined type (UDT) structures.