Find all opened program

A simple sample but very helpful when you want to know active windows and process around you !

Dim Proc() As Process = Process.GetProcesses
For Each p As Process In Proc
Me.ListBox1.Items.Add("Process Name - " & p.ProcessName)
Next
For Each p2 As Process In Proc
If p2.MainWindowTitle <> "" Then
Me.ListBox1.Items.Add("Process window title - " & p2.MainWindowTitle)
End If
Next

0 comments:

Post a Comment