This documentation is archived and is not being maintained.

Creating and Using Objects

Visual Studio 2008

Objects are combinations of code and data that can be treated as single units. Nearly everything you do in Visual Basic involves objects, from the controls you use to the forms on which you place them. This section discusses where objects originate and how to use them.

Objects from Visual Basic and Other Sources

Discusses how to use objects from Microsoft Word, Microsoft Excel, and other applications.

How to: Set and Retrieve Properties

Discusses how to change and obtain property values.

How to: Perform Actions with Methods

Describes what methods are and how to use them.

How to: Treat Forms as Objects

Shows how to use forms in the same way as ordinary objects.

How to: Access a Form

Demonstrates how to access the members of a form without having to create a variable.

How to: Use the New Keyword

Shows how to create instances of forms, classes defined in class modules, and collections.

Resource Management

Discusses how to save memory and system resources by releasing references to objects.

How to: Pass Objects to Procedures

Describes how to pass objects as arguments to procedures.

Walkthrough: Persisting an Object in Visual Basic

Demonstrates how serialization can be used to persist an object's data between instances, allowing you to store values and retrieve them the next time the object is instantiated.

How to: Inherit from a Class in Visual Basic

Shows how to define a base class and declare classes that extend the base class.

Objects in Visual Basic

Covers object-oriented programming fundamentals.

Managing Groups of Objects

Lists techniques for working with arrays and collections of objects.

How to: Perform Multiple Actions on an Object

Covers using the With...End With statement to simplify property access.