Visual Basic 2008 » Chapter 3

Understanding Objects and Collections

In Chapter 1, "Getting Started With Visual Basic 2008," you were introduced to programming in Visual Basic by building a Picture Viewer project. You then spent Chapter 2, "Understanding the Visual Basic 2008 Environment," digging into the integrated development environment (IDE) and learning skills critical to your success with Visual Basic. In this chapter, you begin learning about an important programming concept: objects.

The term object as it relates to programming might have been new to you prior to this tutorial. The more you work with Visual Basic, the more you'll hear about objects. Visual Basic 2008, unlike its predecessors, is a true object-oriented language. This chapter doesn't discuss object-oriented programming in any detail; you'll learn about objects in a more general sense.

Everything you use in Visual Basic is an object, so understanding this material is critical to your success with Visual Basic. For example, forms are objects, as are the controls you place on a form. Pretty much every element of a Visual Basic project is an object and belongs to a collection of objects. All objects have attributes (called properties), most have methods, and many have events. Whether creating simple applications or building large-scale enterprise solutions, you must understand what an object is and how it works. In this chapter, you'll learn what makes an object an object, and you'll also learn about collections.

 

Chapter 3.1: Understanding Objects

The most commonly used objects in Visual Basic are the form object and the control object. Read more...

 

Chapter 3.2: Understanding Properties

All objects have attributes that are used to specify and return the state of the object, these attributes are properties. Read more...

 

Chapter 3.3: Understanding Methods

Methods are actions the object can perform, in contrast to attributes, which describe the object. Read more...

 

Chapter 3.4: Building a Simple Object Example Project

The only way to really grasp what objects are and how they work is to use them. Read more...

 

Chapter 3.5: Understanding Collections

A collection is just what its name implies: a collection of objects. Read more...

 

Chapter 3.6: Using the Object Browser

Visual Basic 2008 includes a useful tool that enables you to easily view members of all the objects in a project: the Object Browser. Read more...