Private Sub Form1_Load(ByVal sender As System.Object, ByVal _
e As System.EventArgs) Handles MyBase.Load
Dim computer_info As New Devices.ComputerInfo
AddItem(lvProperties, "InstalledUICulture", _
computer_info.InstalledUICulture.DisplayName)
AddItem(lvProperties, "OSFullName", _
computer_info.OSFullName)
AddItem(lvProperties, "OSPlatform", _
computer_info.OSPlatform)
AddItem(lvProperties, "OSVersion", _
computer_info.OSVersion)
AddItem(lvMemory, "AvailablePhysicalMemory", _
FormatBigBytes(computer_info.AvailablePhysicalMemory, _
2))
AddItem(lvMemory, "AvailableVirtualMemory", _
FormatBigBytes(computer_info.AvailableVirtualMemory, _
2))
AddItem(lvMemory, "TotalPhysicalMemory", _
FormatBigBytes(computer_info.TotalPhysicalMemory, _
2))
AddItem(lvMemory, "TotalVirtualMemory", _
FormatBigBytes(computer_info.TotalVirtualMemory, 2))
End Sub
Private Sub AddItem(ByVal lv As ListView, ByVal item_name _
As String, ByVal item_value As String)
Dim lv_item As ListViewItem = lv.Items.Add(item_name)
lv_item.SubItems.Add(item_value)
End Sub
|