Objects (Visual Basic)


Updated: July 20, 2015

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

This topic provides links to other topics that document the Visual Basic run-time objects and contain tables of their member procedures, properties, and events.

CollectionProvides a convenient way to see a related group of items as a single object.
ErrContains information about run-time errors.
The My.Application object consists of the following classes:

 ApplicationBase provides members that are available in all projects.

 WindowsFormsApplicationBase provides members available in Windows Forms applications.

 ConsoleApplicationBase provides members available in console applications.
Provides data that is associated only with the current application or DLL. No system-level information can be altered with My.Application.

Some members are available only for Windows Forms or console applications.
My.Application.Info (Info)Provides properties for getting the information about an application, such as the version number, description, loaded assemblies, and so on.
My.Application.Log (Log)Provides a property and methods to write event and exception information to the application's log listeners.
My.Computer (Computer)Provides properties for manipulating computer components such as audio, the clock, the keyboard, the file system, and so on.
My.Computer.Audio (Audio)Provides methods for playing sounds.
My.Computer.Clipboard (Clipboard)Provides methods for manipulating the Clipboard.
My.Computer.Clock (Clock)Provides properties for accessing the current local time and Universal Coordinated Time (equivalent to Greenwich Mean Time) from the system clock.
My.Computer.FileSystem (FileSystem)Provides properties and methods for working with drives, files, and directories.
My.Computer.FileSystem.SpecialDirectories (SpecialDirectories)Provides properties for accessing commonly referenced directories.
My.Computer.Info (ComputerInfo)Provides properties for getting information about the computer's memory, loaded assemblies, name, and operating system.
My.Computer.Keyboard (Keyboard)Provides properties for accessing the current state of the keyboard, such as what keys are currently pressed, and provides a method to send keystrokes to the active window.
My.Computer.Mouse (Mouse)Provides properties for getting information about the format and configuration of the mouse that is installed on the local computer.
My.Computer.Network (Network)Provides a property, an event, and methods for interacting with the network to which the computer is connected.
My.Computer.Ports (Ports)Provides a property and a method for accessing the computer's serial ports.
My.Computer.Registry (RegistryProxy)Provides properties and methods for manipulating the registry.
My.Forms ObjectProvides properties for accessing an instance of each Windows Form declared in the current project.
My.Log (AspLog)Provides a property and methods for writing event and exception information to the application's log listeners for Web applications.
My.Request ObjectGets the HttpRequest object for the requested page. The My.Request object contains information about the current HTTP request.

The My.Request object is available only for ASP.NET applications.
My.Resources ObjectProvides properties and classes for accessing an application's resources.
My.Response ObjectGets the HttpResponse object that is associated with the Page. This object allows you to send HTTP response data to a client and contains information about that response.

The My.Response object is available only for ASP.NET applications.
My.Settings ObjectProvides properties and methods for accessing an application's settings.
My.User (User)Provides access to information about the current user.
My.WebServices ObjectProvides properties for creating and accessing a single instance of each Web service that is referenced by the current project.
TextFieldParserProvides methods and properties for parsing structured text files.

Visual Basic Language Reference
Visual Basic