This snippet will list all of your system's current processes that are running into a console window using VB.NET. To load the snippet, go to File>New Project>Console Application and copy paste the module.
Module Processes
Dim x As Integer = 0
Sub Main()
Dim pList() As System.Diagnostics.Process = _
System.Diagnostics.Process.GetProcesses
For Each proc As System.Diagnostics.Process In pList
System.Console.WriteLine(proc.ProcessName & " " & proc.Id)
x += 1
Next
System.Console.WriteLine(vbCrLf + "*** Number of processes: " & x)
System.Console.ReadLine()
End Sub
End Module