Creating and Using Objects
Objects are combinations of code and data that can be treated as single units. Nearly everything you do in Visual Basic .NET 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.
In This Section
- Objects from Visual Basic and Other Sources
- Discusses how to use objects from Microsoft Word, Microsoft Excel, and other applications.
- Setting and Retrieving Properties
- Discusses how to change and obtain property values.
- Performing Actions with Methods
- Describes what methods are and how to use them.
- Performing Multiple Actions on an Object
- Covers using the With...End With statement to simplify property access.
- Treating Forms as Objects
- Shows how to use forms in the same way as ordinary objects.
- Using 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.
- Passing Objects to Procedures
- Describes how to pass objects as arguments to procedures.