G
Guest
I am trying to list all the instances of notepad and some other specific apps
running on my computer using the code below:
Dim myPro() As System.Diagnostics.Process
myProcess = System.Diagnostics.Process.GetProcessesByName("notepad")
If myProcess.Length > 0 Then
For Each myCess As Process In myProc
If myCess.MainWindowTitle <> "" Then
listboxBrowsers.Items.Add(myCess.MainWindowTitle)
End If
Next
I do the above for each of the apps I want to appear in the listbox
The problem is, not all instances of all process shows up in my listbox.
(the same for vista's Task Manager also - not all instances of winword or
firefox shows up there either - even though the correct number shows up in
TM's application list)
I am trying to stop the process running in my listbox, by selecting a
process and then issueing a kill, but the code below is not working for me:
Dim myProcesses As System.Diagnostics.Process()
myProcesses =
Process.GetProcessesByName(listbox1.SelectedIndex.ToString())
Dim processCount As Integer = myProcesses.Length
For myProCount As Integer = 0 To processCount - 1
myProcesses(myProCount).Kill()
Next
When I press the button over this code nothing happens
I will be thankful for any help
running on my computer using the code below:
Dim myPro() As System.Diagnostics.Process
myProcess = System.Diagnostics.Process.GetProcessesByName("notepad")
If myProcess.Length > 0 Then
For Each myCess As Process In myProc
If myCess.MainWindowTitle <> "" Then
listboxBrowsers.Items.Add(myCess.MainWindowTitle)
End If
Next
I do the above for each of the apps I want to appear in the listbox
The problem is, not all instances of all process shows up in my listbox.
(the same for vista's Task Manager also - not all instances of winword or
firefox shows up there either - even though the correct number shows up in
TM's application list)
I am trying to stop the process running in my listbox, by selecting a
process and then issueing a kill, but the code below is not working for me:
Dim myProcesses As System.Diagnostics.Process()
myProcesses =
Process.GetProcessesByName(listbox1.SelectedIndex.ToString())
Dim processCount As Integer = myProcesses.Length
For myProCount As Integer = 0 To processCount - 1
myProcesses(myProCount).Kill()
Next
When I press the button over this code nothing happens
I will be thankful for any help