Export (0) Print
Expand All

My.Computer Object 

Provides properties for manipulating computer components such as audio, the clock, the keyboard, the file system, and so on.

The properties exposed by the My.Computer object return information about the computer on which the application is deployed, as determined at run time. Typically, this data differs from what was available on the development computer.

Some members, such as the My.Computer.Audio object, are available only for non-server applications.

The following table lists examples of tasks involving the My.Computer object.

This example uses the My.Computer.Name property to display the name of the computer on which the code runs.

MsgBox("Computer name: " & My.Computer.Name)

Namespace: Microsoft.VisualBasic.Devices

Class: Computer (the base class ServerComputer provides the members that are available in all projects)

Assembly: Visual Basic Runtime Library (in Microsoft.VisualBasic.dll)

Show:
© 2014 Microsoft