|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer|
Visual Basic Language Walkthroughs
Walkthroughs give step-by-step instructions for common scenarios, which makes them a good place to start learning about the product or a particular feature area.
In This Section
- Walkthrough: Declaring and Raising Events
Illustrates how events are declared and raised in Visual Basic.
- Handling Events
Shows how to handle events using either the standard WithEvents keyword or the new AddHandler/RemoveHandler keywords.
- Defining Classes
Describes how to declare a class and its fields, properties, methods, and events.
- Calling Windows APIs
Explains how to use Declare statements and call Windows APIs. Includes information about using attributes to control marshaling for the API call and how to expose an API call as a method of a class.
- Creating and Implementing Interfaces
Shows how interfaces are declared and implemented in Visual Basic.
Shows how to create a multithreaded application that searches a text file for occurrences of a word.
- Structured Exception Handling
Demonstrates how to create and maintain programs with comprehensive error handling, and how to use Try...Catch...Finally.
- Creating COM Objects with Visual Basic
Demonstrates how to create COM objects in Visual Basic, both with and without the COM class template.
- Implementing Inheritance with COM Objects
Demonstrates how to use Visual Basic 6.0 to create a COM object containing a class, and then use it as a base class in Visual Basic.
- Manipulating Files and Folders in Visual Basic
Demonstrates how to use Visual Basic functions to determine information about a file, search for a string in a file, and write to a file.
- Manipulating Files Using .NET Framework Methods
Demonstrates how to use .NET Framework methods to determine information about a file, search for a string in a file, and write to a file.