Hi i need to work with windows of processes that are running on my pc
from a certain programme. I've figured out how to build an array of
processes that contain just the processes i'm interested in by checking
what the process name starts with.
How do i find out the hWnd for the processes i've returned, because the
function i need to run wants me to pass it the hWnd of the processes.
Here's what I have so far, using notepad as my example : -
static void EnumerateWindows()
{
System.Diagnostics.Process[] processes;
processes =
System.Diagnostics.Process.GetProcessesByName("not epad");
foreach (System.Diagnostics.Process instance in processes)
{
MessageBox.Show(instance.Handle.ToString());
}
}
}
Thankyou experts,
Gary.