Visual Basic Development with the New "My" Namespace

Visual Basic 2005 provides new features for rapid application development that aim to improve productivity and ease of use while delivering power. One of these features, called My, provides access to commonly used functionality provided by the .NET Framework, as well as information and default object instances that are related to the application and its run-time environment. This information is organized in a format that is discoverable through IntelliSense and logically delineated according to use. For more information, see Development with My.

Developing Applications

The My.Application Object provides access to an application, allowing you to easily update it and log information from it. My.Application can also be used to access an application's command-line arguments or run code when the application starts or ends. For more information, see Updating an Application, Logging Information from the Application, and Accessing a Running Application in Visual Basic.

Clipboard

The My.Computer.Clipboard Object provides easy access for reading from and writing to the Clipboard, along with methods for clearing it and determining what type of data is stored on it. For more information, see Storing Data to and Reading From the Clipboard.

Computer Resources

Many computer resources can be accessed through My objects, including the computer's clock, keyboard, mouse, ports, and registry. For more information, see Accessing Computer Resources.

File Input/Output

The My.Computer.FileSystem Object provides file-access methods and properties that simplify file I/O. The TextFieldParser Object allows you to parse large delimited or fixed-width text files; methods such as WriteAllText, WriteAllBytes, ReadAllText, and ReadAllBytes make reading and writing to files intuitive while increasing performance. Similarly, the GetFileInfo, GetDirectoryInfo, and GetDriveInfo methods provide information about files, directories, and drives. For more information, see Parsing Text Files with the TextFieldParser Object.

Network Operations

The My.Computer.Network Object provides methods and properties for uploading and downloading files, for checking connection status, and for determining whether remote computers are available. For more information, see Performing Network Operations.

Resources

The My.Resources Object allows you to access resources such as audio resources, icon resources, and localized resources. For more information, see Accessing Application Resources.

You can add and manage resources using the Resources page of the Project Designer. For more information, see Resources Page, Project Designer.

User Settings and Application Settings

The My.Settings Object allows you to persist and change user settings as well as read application settings. For more information, see Accessing Application Settings.

You can also manage application settings using the Settings page of the Project Designer. For more information, see Settings Page, Project Designer.