Vb VisualBasic 6.0 Computer ProcessList Example

Private Sub Command1_Click()

‘ add to listbox1 and button1

Dim colProcessList

Dim objprocess

Set colProcessList = GetObject(“Winmgmts:”).ExecQuery(“Select * from Win32_Process “)

For Each objprocess In colProcessList

List1.AddItem “Process Name=” & objprocess.Name

List1.AddItem “Caption=” & objprocess.Caption

Next

Set colProcessList = Nothing

Set objprocess = Nothing

End Sub

VN:F [1.9.22_1171]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)