how to find all application/Thread running in a process in windows application in c#?
i want to get list of all application or Threads attached with a process.For example when we open different window all run with explorer.exe or we open different window of mozila all are in firefox.exe. i have to check that if a window is all ready open no need to open this.and if it is in background or minimized then then activate th开发者_如何学JAVAe window.
To get all processes
Process.GetProcesses();
or
Process.GetProcessByName("Name"); //To get a process
or
Process.GetCurrentProcess() //To Get the current running process
Once you get your process you have an attribute called Threads.
Is that what you are looking for?
Once you get the Process you can use ProcessName and once you get the ProcessThread you can use ID.
精彩评论