I have a process with GetProcessesByName("" + Path,"X.X.X.X")
and I need to know the handle of the window which is launched from it.
How can I do this?
I have a process with GetProcessesByName("" + Path,"X.X.X.X")
and I need to know the handle of the window which is launched from it.
How can I do this?
There's MainWindowHandle
property which can help you for that :
Process[] processes = Process.GetProcessesByName("yourprocess.exe");
foreach (Process p in processes)
{
IntPtr windowHandle = p.MainWindowHandle;
}