🔒 Closed Help - vb.net | treeview child nodes

Status
Not open for further replies.

cflor013

Enthusiast
Hi, I'm using Win32_PhysicalMemory to get RAM info and output to a treeview. Ito ang meron ako ngayon
3.webp

Pero gusto ko sana ganito specially for multiple ram modules

4.webp

Patulong po sa code ko, Thanks in advance

2.webp

Sub memory()
Try
Dim MyOBJ As Object
Dim RAM As Object
MyOBJ = GetObject("WinMgmts:").instancesof("Win32_PhysicalMemory")
Dim Memory = New TreeNode("Memory")
TreeView1.Nodes.Add(Memory)
For Each RAM In MyOBJ
TreeView1.Nodes(1).Nodes.Add(New TreeNode(RAM.name & " - Size: " & FormatBytes(RAM.Capacity) & " - Speed: " & RAM.Speed & "MHz"))
Next
Catch ex As Exception
MsgBox("Error on Win32_PhysicalMemory " & ex.Message)
End Try
End Sub
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 594
    Views
  • 1
    Participants
Last reply from:
cflor013

Trending Topics

Online now

Members online
1,292
Guests online
3,710
Total visitors
5,002

Forum statistics

Threads
2,328,858
Posts
29,244,937
Members
1,158,102
Latest member
riskywiggle
Back
Top