|
|
Title | Use My.Computer.Info to display operating system and memory information in Visual Basic .NET |
Description | This example shows how to use My.Computer.Info to display operating system and memory information in Visual Basic .NET. |
Keywords | My.Computer.Info, operating system, memory, Visual Basic .NET, VB.NET |
Categories | Miscellany, Tips and Tricks |
|
|
When the program loads, it uses the following code to display system information available in My.Computer.Info.
|
|
lblOSFullName.Text = My.Computer.Info.OSFullName
lblOSPlatform.Text = My.Computer.Info.OSPlatform
lblOSVersion.Text = My.Computer.Info.OSVersion
lblTotPhys.Text = _
FormatNumber(My.Computer.Info.TotalPhysicalMemory, 0) & _
" bytes"
lblTotVirt.Text = _
FormatNumber(My.Computer.Info.TotalVirtualMemory, 0) & _
" bytes"
lblAvailPhys.Text = _
FormatNumber(My.Computer.Info.AvailablePhysicalMemory, _
0) & " bytes"
lblAvailVirt.Text = _
FormatNumber(My.Computer.Info.AvailableVirtualMemory, _
0) & " bytes"
|
|
See also Get day, month, date, time, and number format information for the computer's locale in Visual Basic 2005, which uses My.Computer.Info.InstalledUICulture to get date and time format information.
|
|
|
|
|
|