Open project as windows application and add one listbox and one button there.
Form will look like this
Now double click the button and just copy paste or write the following code inside button1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim plist() As Process
Dim myprocess As System.Diagnostics.Process
plist = Process.GetProcesses
ListBox1.Items.Clear()
For Each myprocess In plist
ListBox1.Items.Add(myprocess.ProcessName)
Next
End Sub
Now Run the program and click the button1.
0 comments:
Post a Comment