Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Getting Processes
12-20-2009, 11:25 AM
Post: #1
Getting Processes
Code:
Public Class Processes

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        GetEm()
    End Sub

    Private Sub GetEm()
        ListProcesses.Items.Clear()
        ListProcesses.DisplayMember = "ProcessName"

        Dim p As System.Diagnostics.Process
        For Each p In System.Diagnostics.Process.GetProcesses
            ListProcesses.Items.Add(p)
        Next
    End Sub
End Class

[Image: pgsig copy.png]
Visit this user's website Find all posts by this user
Quote this message in a reply
12-20-2009, 11:15 PM
Post: #2
RE: Getting Processes
.NET really rulez in this area. Very easy and structured !
for each loop really rocks !
You really don't need to know final number of elements !

"I dont know with what weapons World War 3 will be fought with, but i know World War 4 will be fought with stones and sticks" - Albert Einstein
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


 Quick Theme: