Getting Computer Information

My.Computer provides the ability of retrieving information on the current machine. The first information is the machine name, which is available from My.Computer.Name, a property of type String. Second is the My.Computer.Info property of type Microsoft.VisualBasic.Devices.ComputerInfo, which collects information such as the total and available memory, both physical and virtual or the name, platform, and version of the operating system. The following code shows how you can get some information on the system:

Console.WriteLine("Computer name {0}: ", My.Computer.Name)Console.WriteLine("Total physical memory {0}: ",                  My.Computer.Info.TotalPhysicalMemory)Console.WriteLine("Available ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.