This documentation is archived and is not being maintained.

Visual Basic 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

Creating a Distributed Application

Explains how to create a multitiered, distributed application that has both a rich Windows client and a browser interface.

Reading XML Data into a Dataset

Describes how to read XML data into a form.

Validating User Input in a Web Forms Page

Describes how to use Web Forms validation controls to check user entries without code, including required entries, data types, patterns, and specific values.

Creating a Dataset with the Dataset Designer

Describes the steps to create a dataset and use it to validate data in a one-to-many or keyed relationship.

Handling a Concurrency Exception

Creates a Windows application that raises a concurrency error and illustrates one strategy for handling it.

Creating an XML Web Service Using Visual Basic or Visual C#

Explains how to create an XML Web service that converts temperatures measured in Fahrenheit to Celsius.

Accessing an XML Web Service Using Visual Basic or Visual C#

Describes how to make use of an existing XML Web service.

Creating a Simple Windows Form

Describes how to build and run a simple Windows Form.

Demonstrating Visual Inheritance

Describes how to create a base Windows Form and compile it into a class library. You will import this class library into another project, and create a new form that inherits from the base form.

Creating a Windows Service Application in the Component Designer

Describes how to create a long-running executable file that does not have a user interface.

Calling XML Web Services from Windows Forms

Describes how to make calls to XML Web service methods from a Windows application.

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.

Retrieving Dialog Box Information Collectively Using Objects

Gives directions for using an object to expose a group of related data from a dialog box.

Updating Status Bar Information at Run Time

Gives directions for programmatically controlling the data within status bar panels.

Creating Reusable Elements with ASP.NET User Controls

Describes how to create a Web Forms user control — a page configured to act as a control — and use it on another page.

Displaying an XML Document in a Web Forms Page Using Transformations

Gives step-by-step details on how to read an XML file and display it in different ways on a Web Forms page.

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.

Declaring and Raising Events

Illustrates how events are declared and raised in Visual Basic.

Defining Classes

Describes how to declare a class and its fields, properties, methods, and events.

Handling Events

Shows how to handle events using either the standard WithEvents keyword or the new AddHandler and RemoveHandler keywords.


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 2005

Demonstrates how to create COM objects with 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 2005.

Manipulating Files and Directories in Visual Basic

Provides an introduction to the fundamentals of file I/O.

Manipulating Files Using .NET Framework Methods

Demonstrates how to use the .NET Framework to manipulate files and folders.

Authoring a Component with Visual Basic

Shows the development of a simple component in Visual Basic, illustrating the interaction between client and component, object lifetime and circular references, debugging clients and components, and the use of shared methods and instance methods.

Authoring a Simple Multithreaded Component with Visual Basic

Demonstrates the development of a simple multithreaded component in Visual Basic, explaining how threads work and how to coordinate multiple threads in your component.

Authoring a Composite Control with Visual Basic

Shows the development of a simple control in Visual Basic that inherits from the UserControl class, and how to inherit from an established user control.

Inheriting from a Windows Forms Control with Visual Basic

Demonstrates how to create a simple inherited button control. This button will inherited functionality from the standard Windows Forms button and will expose a custom property.

Exploring Event Logs, Event Sources, and Entries

Describes how to use an EventLog component instance to interact with existing logs, create custom logs, and read and write values to logs.

Installing an Event Log Component

Describes how to use an installation component to configure server resources needed for your EventLog component instance.

Changing Where My.Application.Log Writes Information

Shows how to override the default settings and cause a Log object to write to other log listeners.

Creating Custom Log Listeners

Demonstrates how to create a custom log listener and configure it to listen to the output of the My.Application.Log object.

Determining Where My.Application.Log Writes Information

Describes the default settings for logs and how to determine the settings for your application.

Filtering My.Application.Log Output

Demonstrates how to change the default log filtering for the My.Application.Log object, to control what information is passed from the Log object to the listeners and what information is written by the listeners.

Turning Off My.Application.Log Output

Demonstrates how to turn off the default log filtering for the My.Application.Log object.

Creating a Queue and Working with Messages

Describes how to use a MessageQueue component instance to interact with Windows message queues.

Changing and Retrieving Performance Counter Values

Describes how to use a PerformanceCounter component instance to retrieve and set raw and calculated values from a Windows performance counter

Retrieving Categories and Counters

Describes how to use a PerformanceCounter component instance to retrieve lists of Windows performance counter categories on a server

Managing a Windows Process

Describes how to use the Process component to monitor and interact with Windows processes on a server

Reacting to File System Events

Describes how to use a FileSystemWatcher component instance to monitor files and directories and react when changes occur

Upgrading a Visual Basic 6.0 Application to the Current Version of Visual Basic

Describes how to upgrade the standard calculator sample from Visual Basic 6.0 to Visual Basic 2005.

Localizing Windows Forms

Describes the major steps in creating a global-ready Windows Forms application.

Creating an Accessible Web Application

Describes how to create an ASP.NET Web application that is optimized for different accessibility issues.

Creating an Accessible Windows-based Application

Describes how to create a Windows application that is optimized for different accessibility issues.

Encrypting and Decrypting Strings in Visual Basic

Demonstrates how to encrypt and decrypt strings using the Data Encryption Standard algorithm.

Validate That Passwords Are Complex

Shows how to determine whether a string has the characteristics of a strong password.

Creating a Registry Key and Changing Its Values

Demonstrates how to create a registry key and its subkeys, change their settings, and delete keys.

Implementing Custom Authentication and Authorization

Demonstrates how to implement custom authentication and authorization by using classes that derive from IIdentity and IPrincipal.

Related Sections

Windows Installer Deployment Walkthroughs

Provides step-by-step examples of common deployment scenarios.

Visual Studio Walkthroughs

Gives a related list of walkthroughs for all areas of programming in Visual Studio.