Not sure if the brackets are missing or if it's ok in vb.net lol
Short and Simple.
I have The "Imports System.Diagnostics" Namespace but yet Process.GetProcesses doesn't work
Anyone Help me please?
Code:Imports System.Diagnostics Public Class Process Private Sub NsButton2_Click(sender As Object, e As EventArgs) Handles NsButton2.Click For Each OneProcess As Process In Process.GetProcesses ListBox1.Items.Add(OneProcess.ProcessName) Next End Sub End Class
Not sure if the brackets are missing or if it's ok in vb.net lol
Last edited by Biesi; 01-11-2015 at 01:33 PM.
Use the cycle deltan to get all the processes...
First of all, clear the listbox if the user want to get again the processes:
get visible and invisible processes:Code:ListBox1.Items.Clear()
get all the processes:Code:For Each all As Process In Process.GetProcesses If all.MainWindowTitle = String.Empty = False Then ListBox1.Items.Add(all.ProcessName & " - Visible") '< delete all this to get just the invisible processes Else ListBox1.Items.Add(all.ProcessName & " - Not visible") '< delete all this to get just the visible processes End If Next
you don't need to import System.Diagnostics namespacesCode:For Each all As Process In Process.GetProcesses ListBox1.Items.Add(all.ProcessName) Next
Last edited by Raydenman; 01-11-2015 at 01:54 PM.
You're importing a "Process" class AND creating your own....it's not sure which Process class to look for the function in.Imports System.Diagnostics
Public Class Process
...
End Class
Last edited by abuckau907; 01-11-2015 at 02:18 PM.
'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
--
It must work. https://gyazo.com/e243aa204f1322bdccc8e311de788f7f
I missed that... you need to replace "Process" w/ something else
Last edited by Raydenman; 01-11-2015 at 02:18 PM.
@Mayion Solved Prefix please
Solved, Closed.
I do not use any type of messenger outside of MPGH.
Inactive but you can reach me through VM/PM.
Sasuke Uchiha! (01-13-2015)