Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Windows Applications (How Do I in Visual Basic)

This page links to help on widely used Visual Basic tasks for creating Windows applications. To view other categories of popular tasks covered in Help, see How Do I in Visual Basic.

Structure of a Visual Basic Program

Shows the general outline of a simple Visual Basic program.

Walkthrough: Creating a Simple Windows Form

Demonstrates how to make a simple "Hello, World" application.

Additions to Windows Forms for the .NET Framework 2.0

Lists the new and enhanced features available with this release of Visual Studio.

What's New in Windows Forms for Visual Basic 6.0 Users

Highlights key changes for Visual Basic 6 users.

Working with Forms

Design Time

How to: Choose the Startup Form in a Windows Application

Gives directions for setting the first form shown when your application is run.

How to: Connect Multiple Events to a Single Event Handler in Windows Forms

Gives directions for assigning the same functionality to multiple controls through events.

How to: Create a Multipane User Interface with Windows Forms

Describes how to create a multipane user interface that is similar to the one used in Microsoft Outlook.

How to: Add Background Images to Windows Forms

Describes how to place a background image in a control or on the form itself.

How to: Set ToolTips for Controls on a Windows Form at Design Time

Describes how to set ToolTips in code or in the designer.

How to: Reassign Existing Controls to a Different Parent

Gives directions for assigning existing controls to a new parent container.

How to: Add ActiveX Controls to Windows Forms

Gives directions for working with legacy ActiveX controls.

How to: Provide Help in a Windows Application

Explains how to use the HelpProvider component to link controls to files in a Help system.

How to: Create Access Keys for Windows Forms Controls

Gives information on creating predefined keyboard shortcuts.

How to: Inherit Windows Forms

Gives directions for creating inherited forms in code.

How to: Inherit from Existing Windows Forms Controls

Describes how to create an inherited control.

Run Time

How to: Add to or Remove from a Collection of Controls at Run Time

Explains how to add and remove controls on a panel at run time.

How to: Enable Windows XP Visual Styles

Gives directions for using the EnableVisualStyles property to give forms and controls the standard Windows XP look.

How to: Make a Startup Windows Form Invisible

Gives directions for establishing a form's initial visibility at run time.

How to: Keep a Windows Form on Top

Gives directions for ensuring your Windows Form stays on top of all other forms at run time.

How to: Display Modal and Modeless Windows Forms

Gives directions for showing a dialog box modally versus modelessly.

How to: Make Your Control Invisible at Run Time

Gives directions for how to create a user control that is invisible at run time.

Common Controls

TextBox Controls

How to: Select Text in the Windows Forms TextBox Control

Explains how to highlight text in a text box.

How to: Put Quotation Marks in a String (Windows Forms)

Explains adding quotation marks to a string in a text box.

How to: Display Scroll Bars in the Windows Forms RichTextBox Control

Describes the many choices available for scroll bars in the RichTextBox control.

How to: Create a Read-Only Text Box (Windows Forms)

Describes how to prevent the contents of a text box from being changed.

How to: Create a Password Text Box with the Windows Forms TextBox Control

Explains how to conceal what is typed into a text box.

How to: Control the Insertion Point in a Windows Forms TextBox Control

Gives directions for specifying where the insertion point appears when an edit control first gets the focus.

How to: Retrieve Data from the Clipboard

Describes how to access the data stored on the Clipboard.

How to: Add Data to the Clipboard

Describes a method for programmatically inserting information on the Clipboard.

How to: Bind Data to the MaskedTextBox Control

Demonstrates how to reformat the data when data in the database does not match the format expected by your mask definition.

Walkthrough: Working with the MaskedTextBox Control

Demonstrates the key features of the MaskedTextBox control.

RichTextBox Controls

How to: Load Files into the Windows Forms RichTextBox Control

Provides instructions for loading an existing file into the RichTextBox control.

How to: Display Scroll Bars in the Windows Forms RichTextBox Control

Describes the many choices available for scroll bars in the RichTextBox control.

How to: Set Font Attributes for the Windows Forms RichTextBox Control

Describes how to set the font family, size, style, and color of text in the RichTextBox control.

How to: Set Indents, Hanging Indents, and Bulleted Paragraphs with the Windows Forms RichTextBox Control

Describes how to format paragraphs in the RichTextBox control.

How to: Enable Drag-and-Drop Operations with the Windows Forms RichTextBox Control

Provides instructions for dragging data into the RichTextBox control.

How to: Display Web-Style Links with the Windows Forms RichTextBox Control

Explains how to link to Web sites from the RichTextBox control.

Button Controls

How to: Respond to Windows Forms Button Clicks

Explains the most basic use of a button on a form in a Windows application.

How to: Designate a Windows Forms Button as the Accept Button Using the Designer

Shows how to set a button up as the Accept button.

How to: Designate a Windows Forms Button as the Cancel Button Using the Designer

Shows how to set a button up as the Cancel button.

CheckBox and RadioButton Controls

CheckBox Control

How to: Set Options with Windows Forms CheckBox Controls

Describes how to use a check box to set options such as properties of an object.

How to: Respond to Windows Forms CheckBox Clicks

Explains how to use a check box to determine your application's actions.

RadioButton Controls

How to: Group Windows Forms RadioButton Controls to Function as a Set

Explains how to group radio buttons as a set, of which only one may be selected.

ListBox, ComboBox, and CheckedListBox Controls

How to: Bind a Windows Forms ComboBox or ListBox Control to Data

Gives directions for binding a list-based control to a data source.

How to: Create a Lookup Table for a Windows Forms ComboBox, ListBox, or CheckedListBox Control

Gives directions for displaying and storing form data in useful formats.

How to: Add and Remove Items from a Windows Forms ComboBox, ListBox, or CheckedListBox Control

Gives instructions for adding or removing items from a control's list of items.

How to: Access Specific Items in a Windows Forms ComboBox, ListBox, or CheckedListBox Control

Gives instructions for programmatically determining which item in a list appears in a given position.

How to: Sort the Contents of a Windows Forms ComboBox, ListBox, or CheckedListBox Control

Explains how to sort list data at its data source.

CheckedListBox Control

How to: Determine Checked Items in the Windows Forms CheckedListBox Control.

Describes how to step through a list to determine which items are checked.

DataGridView Control

How to: Bind Data to the Windows Forms DataGridView Control Using the Designer

Describes how to use the Choose Data Source option on the control's smart tag to connect to data.

How to: Create a Master/Detail Form Using Two Windows Forms DataGridView Controls

Provides code showing how to display data from two related database tables so that the values shown in one DataGridView control depend on the currently selected row in another control.

How to: Validate Data in the Windows Forms DataGridView Control

Provides code showing how to validate user input to prevent data-entry formatting errors.

How to: Handle Errors That Occur During Data Entry in the Windows Forms DataGridView Control

Provides code showing how to handle data-entry errors that originate from the data source when the user attempts to commit a new value.

How to: Prevent Row Addition and Deletion in the Windows Forms DataGridView Control Using the Designer

Describes how to use the control's smart tag to prevent users from adding or deleting rows.

How to: Specify Default Values for New Rows in the Windows Forms DataGridView Control

Describes how to prepopulate the row for new records to save data-entry time.

How to: Create an Unbound Windows Forms DataGridView Control

Provides code showing how to manually populate the control with data.

How to: Add an Unbound Column to a Data-Bound Windows Forms DataGridView Control

Describes how to supplement data from a bound data source by displaying additional, unbound columns.

How to: Display Images in Cells of the Windows Forms DataGridView Control

Describes how to create an image column that displays an icon in every cell.

How to: Host Controls in Windows Forms DataGridView Cells

Describes how to implement the IDataGridViewEditingControl interface and create custom types derived from DataGridViewCell and DataGridViewColumn in order to display a DateTimePicker control when a cell is in edit mode.

Walkthrough: Validating Data in the Windows Forms DataGridView Control

Describes how to validate user input to prevent data-entry formatting errors.

Walkthrough: Handling Errors that Occur During Data Entry in the Windows Forms DataGridView Control

Describes how to handle data-entry errors that originate from the data source when the user attempts to commit a new value.

Walkthrough: Creating an Unbound Windows Forms DataGridView Control

Describes how to manually populate the control with data.

DataGridView Layout and Formatting

How to: Freeze Columns in the Windows Forms DataGridView Control Using the Designer

Describes how to use the Edit Columns dialog box to prevent specific columns from scrolling.

How to: Make Columns Read-Only in the Windows Forms DataGridView Control Using the Designer

Describes how to use the Edit Columns dialog box to prevent users from editing values in specific columns.

How to: Enable Column Reordering in the Windows Forms DataGridView Control Using the Designer

Describes how to use the control's smart tag to enable users to rearrange columns.

How to: Change the Order of Columns in the Windows Forms DataGridView Control Using the Designer

Describes how to use the Edit Columns dialog box to rearrange columns.

How to: Add and Remove Columns in the Windows Forms DataGridView Control Using the Designer

Describes how to use the Add Columns and Edit Columns dialog boxes to populate and modify the columns collection.

ListView and TreeView Controls

Walkthrough: Creating an Explorer Style Interface with the ListView and TreeView Controls Using the Designer

Demonstrates creating a professional looking Windows application using two common controls.

ListView Control

How to: Add and Remove Items with the Windows Forms ListView Control

Describes how to add or remove items from a list view.

How to: Add Search Capabilities to a ListView Control

Describes two ways to offer search capabilities to a user: text matching and location searching.

How to: Select an Item in the Windows Forms ListView Control

Demonstrates how to programmatically select an item in a Windows Forms ListView control.

How to: Display Icons for the Windows Forms ListView Control

Explains how to associate a list view with an appropriate image list for displaying large or small icons.

How to: Display Subitems in Columns with the Windows Forms ListView Control

Provides instructions for displaying information about each list item in columns.

TreeView Control

How to: Set Icons for the Windows Forms TreeView Control

Gives instructions for displaying icons for the nodes of a tree view.

How to: Add and Remove Nodes with the Windows Forms TreeView Control

Gives instructions for adding and remove nodes from a tree view.

How to: Determine Which TreeView Node Was Clicked (Windows Forms)

Gives instructions for determining which node in a tree view was clicked, so the application can respond appropriately.

Container Controls

How to: Split a Window Horizontally

Describes how to control the orientation of the splitter within the SplitContainer control.

How to: Create a Multipane User Interface with Windows Forms

Creates a multi-pane user interface that is similar to the one used in Microsoft Outlook.

How to: Span Rows and Columns in a TableLayoutPanel Control

Describes how to spread a control across adjacent rows and columns in a TableLayoutPanel.

Walkthrough: Arranging Controls on Windows Forms Using a TableLayoutPanel

Describes how to create a form with a layout that arranges itself appropriately as the form is resized or as the contents change in size.

Walkthrough: Arranging Controls on Windows Forms Using a FlowLayoutPanel

Describes how to create a form with a layout that arranges itself appropriately as the form is resized or as the contents change in size.

Picture and Image Controls

How to: Load a Picture Using the Designer (Windows Forms)

Describes how to load and display a picture on a form at design time by setting properties.

How to: Set Pictures at Run Time (Windows Forms)

Provides instructions for displaying and clearing a picture at run time.

How to: Modify the Size or Placement of a Picture at Run Time (Windows Forms)

Explains what the SizeMode property does and how to set it.

How to: Crop and Scale Images

Explains how to programmatically crop and scale vector and raster images.

Date-Setting Controls

DateTimePicker Control

How to: Set and Return Dates with the Windows Forms DateTimePicker Control

Provides steps to set the date in the control, and to access the date the user has selected.

How to: Display a Date in a Custom Format with the Windows Forms DateTimePicker Control

Explains how to use format strings to display dates in a preferred format.

MonthCalendar Control

How to: Select a Range of Dates in the Windows Forms MonthCalendar Control

Explains how to programmatically select a range of dates from the MonthCalendar control.

How to: Display Specific Days in Bold with the Windows Forms MonthCalendar Control

Explains how to set certain dates to appear bold.

How to: Display More than One Month in the Windows Forms MonthCalendar Control

Describes how to configure the MonthCalendar control to display several months simultaneously.

How to: Change the Windows Forms MonthCalendar Control's Appearance

Describes how to customize the appearance of the MonthCalendar control.

Data Access (for Windows Forms)

What's New in Data

Provides information and links to new data features for client and data tier applications.

How to: Display Data in a Windows Forms DataGridView Control

Describes how to present data in a DataGridView control.

Walkthrough: Passing Data Between Forms in a Windows Application

Provides step by step details on passing values from one form to a second form in an application.

Walkthrough: Displaying Data on a Form in a Windows Application

Provides step by step details on querying data from a database and displaying the data on a form.

Walkthrough: Creating a User Control that Supports Simple Data Binding

Provides step by step details on creating a custom control with attributes specific to working with Windows Forms data binding.

Walkthrough: Creating a Form to Search Data in a Windows Application

Provides step by step details on creating a form that searches for records in a database based on values input by a user.

Walkthrough: Connecting to Data in Objects

Provides step by step details for creating a connection between your application and the properties of an object.

Menus and Toolbars

ToolStrip Control

How to: Create a Basic Windows Forms ToolStrip with Standard Items Using the Designer

Demonstrates how to create a ToolStrip and add seven ToolStripButton controls that represent typical tasks.

How to: Position a ToolStripItem on a ToolStrip

Describes how to position a ToolStripButton on at the leftmost or rightmost end of a ToolStrip.

How to: Disable ToolStripMenuItems Using the Designer

Describes how to disable both entire menus and individual menu commands.

How to: Hide ToolStripMenuItems Using the Designer

Describes how to hide both entire menus and individual menu commands.

How to: Move ToolStripMenuItems

move entire top-level menus and their menu items to a different place on the MenuStrip.

How to: Change the Appearance of ToolStrip Text and Images in Windows Forms

Describes how to define and modify the arrangement of text and images on ToolStripItem controls.

Context Menus

How to: Associate a Shortcut Menu with a Windows Forms NotifyIcon Component

Provides steps for adding a context menu to a NotifyIcon component so that it provides a menu of commands when a user right-clicks it.

How to: Add and Remove Menu Items with the Windows Forms ContextMenu Component

Explains how to add and remove context menu items.

Data Binding with Controls

How to: Handle Errors and Exceptions that Occur with Databinding

Demonstrates using the BindingSource component to gracefully handle errors that occur in a data binding operation.

BindingSource Control

How to: Bind Windows Forms Controls with the BindingSource Component Using the Designer

Describes how to bind controls to a data source, so that, at run time, users can alter and save data related to your application.

How to: Create a Lookup Table with the Windows Forms BindingSource Component

Shows how to use a combo box to display the field with the foreign-key relationship from the parent to the child table.

How to: Reflect Data Source Updates in a Windows Forms Control with the BindingSource

Demonstrates how to respond to changes in the data source using the BindingSource component.

How to: Sort and Filter ADO.NET Data with the Windows Forms BindingSource Component

Demonstrates using the BindingSource component to apply sorts and filters to displayed data.

How to: Bind to a Web Service Using the Windows Forms BindingSource

Shows how to use the BindingSource component to bind to a Web service.

BindingNavigator Control

How to: Navigate Data with the Windows Forms BindingNavigator Control

Provides steps to bind a BindingNavigator control to a data source.

How to: Move Through a DataSet with the Windows Forms BindingNavigator Control

Demonstrates using a BindingNavigator control to move through records in a DataSet.

How to: Add Load, Save, and Cancel Buttons to the Windows Forms BindingNavigator Control

Binds a text box control to data; then a ToolStrip control that is added to the form is modified to include load, save, and cancel buttons.

Printing

How to: Create Standard Windows Forms Print Jobs

Explains how to use the PrintDocument component to print from a form.

How to: Complete Windows Forms Print Jobs

Explains how to alert users to the completion of a print job.

How to: Print a Multi-Page Text File in Windows Forms

Describes sending text to the printer.

How to: Display the PrintDialog Component

Explains how to display the dialog and where it saves properties.

How to: Display Print Preview in Windows Forms Applications

Describes showing users the PrintPreviewDialog control.

How to: Choose the Printers Attached to a User's Computer in Windows Forms

Describes changing the printer to print to using the PrintDialog component at run time.

How to: Capture User Input from a PrintDialog at Run Time

Explains how to modify selected print options programmatically using the PrintDialog component.

User Controls and Custom Controls

Walkthrough: Authoring a Composite Control with Visual Basic

Creates a simple user control and then extends its functionality through inheritance.

How to: Test the Run-Time Behavior of a UserControl

Demonstrates the use of the UserControl Test Container provided by Visual Studio.

How to: Inherit from the UserControl Class

Demonstrates inheritance with the UserControl class.

How to: Author Composite Controls

Demonstrates authoring a user control, a control class library, and inheriting from a user control.

Adding Controls to Your User Control

Demonstrates the basics of working with a user control.

Adding Code to Your User Control

Demonstrates the basics of working with a user control.

Multiple Document Interfaces (MDI)

How to: Create MDI Parent Forms

Gives directions for creating the container for the multiple documents within an MDI application.

How to: Create MDI Child Forms

Gives directions for creating one or more windows that operate within an MDI parent form.

How to: Arrange MDI Child Forms

Gives directions for tiling, cascading, or arranging the child windows of an MDI application.

How to: Determine the Active MDI Child

Gives directions for verifying the child window that has focus, and sending its contents to the Clipboard.

How to: Send Data to the Active MDI Child

Gives directions for transporting information to the active child window.

How to: Create an MDI Window List with MenuStrip (Windows Forms)

Explains how to use the MDI to create a list of all the active child forms on the parent's Window menu.

Graphics

How to: Draw an Outlined Shape

Describes how to draw a shape.

How to: Create a Linear Gradient

Shows how to create a linear gradient using the LinearGradientBrush class.

How to: Create a Path Gradient

Describes how to create a path gradient using the PathGradientBrush class.

How to: Create Figures from Lines, Curves, and Shapes

Shows how to use a GraphicsPath to create figures.

How to: Create Graphics Objects for Drawing

Shows how to create a Graphics object for drawing.

How to: Create Thumbnail Images

Describes how to create thumbnail images.

How to: Create Vertical Text

Describes how to draw vertically aligned text with GDI+.

How to: Align Drawn Text

Shows how to format GDI+ text.

How to: Draw a Line on a Windows Form

Demonstrates how to draw a line.

How to: Rotate, Reflect, and Skew Images

Describes how to draw rotated, reflected, and skewed images.

How to: Draw Text on a Windows Form

Describes how to draw text.

How to: Load and Display Bitmaps

Describes how to load and draw bitmaps.

How to: Load and Display Metafiles

Shows how to load and draw metafiles.

How to: Crop and Scale Images

Explains how to crop and scale vector and raster images.

Localizing and Globalizing Windows Forms

Walkthrough: Localizing Windows Forms

Demonstrates creating and using a resource file for a Windows Application project.

Walkthrough: Creating a Layout That Adjusts Proportion for Localization

Illustrates how to create a layout that proportionally adjusts when you translate displayed string values into other languages.

How to: Support Localization on Windows Forms Using AutoSize and the TableLayoutPanel Control

Shows how to create layouts that can adapt to different text string lengths that you cannot anticipate at design time.

How to: Set the Culture and UI Culture for Windows Forms Globalization

Explains how to set the CurrentCulture and CurrentUICulture properties to determine what resources are loaded for an application and how information is formatted.

How to: Display Right-to-Left Text in Windows Forms for Globalization

Provides instructions for displaying text that flows from right to left on Windows Forms.

How to: Design a Windows Forms Layout that Responds Well to Localization

Demonstrates using a TableLayoutPanel control to build a form that responds well to localization.

How to: Retrieve String Resources in Visual Basic

Shows how to access and retrieve a string resource using the My.Resources object.

How to: Retrieve an Image from the Clipboard in Visual Basic

Demonstrates how to retrieve an image from the Clipboard.

How to: Add or Remove Resources

Illustrates how to use the Resource Designer to add or remove resources for your project.

How to: Add or Remove String Resources

Shows how to use the Strings pane of the Resource Designer to add or remove string resources for your project.

How to: Create a File in Visual Basic

Demonstrates how to create a file.

How to: Move a File in Visual Basic

Demonstrates how to move a file to a different directory.

How to: Rename a File in Visual Basic

Demonstrates how to rename a file.

How to: Delete a File in Visual Basic

Demonstrates how to delete a file.

How to: Create a Copy of a File in the Same Directory in Visual Basic

Demonstrates how to create a copy of a file in the same directory.

Read from Files

How to: Read Text from Files with a StreamReader (Visual Basic)

Demonstrates how to use a StreamReader to read from a file.

How to: Read From Text Files in Visual Basic

Demonstrates how to read from a text file.

How to: Read From Existing Text Files in My Documents (Visual Basic)

Demonstrates how to read from a text file in the My Documents directory.

How to: Read From Binary Files in Visual Basic

Demonstrates how to read from a binary file.

Work with Files

How to: Determine a File's Extension in Visual Basic

Demonstrates how to determine the extension of a file.

How to: Determine a File's Creation Time in Visual Basic

Demonstrates how to determine when a file was created.

How to: Determine the Absolute Path of a File in Visual Basic

Demonstrates how to determine the absolute path of a file.

How to: Determine if a File is Hidden in Visual Basic

Demonstrates how to determine if a file is hidden.

How to: Determine if a File Exists in Visual Basic

Demonstrates how to determine whether a file exists.

How to: Parse File Paths in Visual Basic

Demonstrates how to use the My methods to combine file paths.

How to: Validate File Names and Paths in Visual Basic

Demonstrates how to determine whether a string represents a file name or path.

Work with Drives

How to: Determine a Drive's Volume Label in Visual Basic

Demonstrates how to determine a drive's volume label.

How to: Determine a Drive's Type in Visual Basic

Demonstrates how to determine a drive's type.

How to: Determine a Drive's Total Space in Visual Basic

Demonstrates how to determine a drive's total space.

How to: Determine a Drive's Root Directory in Visual Basic

Demonstrates how to determine a drive's root directory.

Write to Files

How to: Write to Binary Files in Visual Basic

Demonstrates how to write to a binary file.

How to: Write Text to Files in the My Documents Directory in Visual Basic

Demonstrates how to create and write to a new text file in the My Documents directory.

How to: Write Text to Files with a StreamWriter in Visual Basic

Demonstrates how to write to a file with a StreamWriter object.

Work with Folders

How to: Create a Directory in Visual Basic

Demonstrates how to create a directory.

How to: Determine a Directory's Attributes in Visual Basic

Demonstrates how to determine a directory's attributes.

How to: Move a Directory in Visual Basic

Demonstrates how to move a directory.

How to: Determine if a Directory Exists in Visual Basic

Demonstrates how to determine whether a directory exists.

How to: Delete a Directory in Visual Basic

Demonstrates how to delete a directory.

Walkthrough: Filtering My.Application.Log Output

Covers how to filter the output of the My.Application.Log logs.

Walkthrough: Determining Where My.Application.Log Writes Information

Covers how to determine where My.Application.Log writes information.

Walkthrough: Creating Custom Log Listeners

Covers how to create a custom log listener for My.Application.Log.

How to: Write Log Messages

Covers how to write event information to the application's logs.

How to: Write to an Application Event Log

Covers how to configure My.Application.Log to write information to an event log.

How to: Log Exceptions in Visual Basic

Covers how to write exception information to the application's logs.

How to: Create a Windows Application Project

Shows how to create a Windows Application project using the integrated development environment (IDE).

Walkthrough: Implementing Inheritance with COM Objects

Describes using existing COM objects as the basis for new objects.

Walkthrough: Creating COM Objects with Visual Basic

Steps you through the process of creating COM objects with and without the COM class template.

How to: Reference COM Objects from Visual Basic

Covers how to add references to COM objects that have type libraries.

How to: Refer to the Current Instance of an Object

Shows how to use the Me keyword to refer to the instance in which the code is currently running.

How to: Read Application Settings in Visual Basic

Shows how to access an application's forms to determine the values of user settings.

How to: Persist User Settings in Visual Basic

Shows how to access an application's forms to save updated user setting values.

How to: Add or Remove Application Settings

Shows how to use the Settings page of the Project Designer to add or remove application settings.

How to: Receive Strings From Serial Ports in Visual Basic

Demonstrates how to receive a string from a computer's serial port.

How to: Show Available Serial Ports in Visual Basic

Demonstrates how to show available serial ports.

How to: Start an Application and Send it Keystrokes (Visual Basic)

Demonstrates how to start an application and send it keystrokes.

Use the Clipboard

How to: Write to the Clipboard in Visual Basic

Demonstrates how to write data to the Clipboard.

How to: Retrieve an Image from the Clipboard in Visual Basic

Demonstrates how to retrieve an image from the Clipboard.

How to: Read from the Clipboard in Visual Basic

Demonstrates how to read data from the Clipboard.

Play Sounds

How to: Retrieve Audio Resources in Visual Basic

Shows how to use the My.Resources object to retrieve an audio resource.

How to: Play System Sounds in Visual Basic

Shows how to use the My.Computer.Audio object to play a system sound.

How to: Play Sounds in Visual Basic

Shows how to use the My.Computer.Audio object to play a sound from a sound file or application resource in the background.

How to: Play Looping Sounds in Visual Basic

Shows how to use the My.Computer.Audio object to play a sound from a sound file or application resource as a continuous loop.

How to: Stop Playing Sounds in the Background in Visual Basic

Shows how to use the My.Computer.Audio object to stop a sound playing in the background.

Work with the Registry

Walkthrough: Creating a Registry Key and Changing Its Values

Shows how to use the My.Computer.Registry object to create a registry key and set its values.

How to: Set Values in Registry Keys in Visual Basic

Shows how to use the My.Computer.Audio object to set a value in a registry key.

How to: Read a Value from a Registry Key in Visual Basic

Shows how to use the My.Computer.Audio object to read a value from a registry key.

How to: Delete a Registry Key in Visual Basic

Shows how to use the My.Computer.Audio object to delete a registry key.

How to: Determine if a Value Exists in a Registry Key in Visual Basic

Shows how to use the My.Computer.Audio object to determine whether a value exists in a specific registry key.

Use the Event Log

Walkthrough: Exploring Event Logs, Event Sources, and Entries

Takes you through the major feature areas of event logging in your Visual Studio application.

How to: Create and Remove Custom Event Logs

Gives directions for creating custom event logs on the local computer.

How to: Delete Event Logs

Gives directions for deleting an existing log and all of its entries.

How to: Read Event Log Entries

Gives directions for reading event log entries.

How to: Determine If an Event Source Exists

Gives directions for querying to see if a specific log exists.

Work with Networks

How to: Upload a File in Visual Basic

Demonstrates how to upload a file and store it to a remote location using My.Computer.Network.

How to: Check Connection Status in Visual Basic

Shows how to determine whether the computer has a working network connection.

How to: Determine if a Remote Computer is Available in Visual Basic

Shows how to use the Ping method to determine whether a remote computer or host is available.

How to: Open a Project or Solution from Source Control

Describes the opening of a project or solution from source control.

How to: Add a Project to Source Control

Provides procedures for adding a project to source control.

Walkthrough: Validate That Passwords Are Complex (Visual Basic).

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

Walkthrough: Implementing Custom Authentication and Authorization

Demonstrates how to implement custom authentication and authorization, and how to override the application thread's default identity.

Walkthrough: Encrypting and Decrypting Strings in Visual Basic

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

How to: Determine if a User is in a Group

Demonstrates how to use the My.User object to determine the user's role.

How to: Determine a User's Login Name

Demonstrates how to use the My.User object to get the user's login name.

Visual Basic Windows Forms Samples

These samples demonstrate Windows Forms applications.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft