How can I get the window handle by giving the process name or window title in c#.. given the process is in running already
You can use the Process class.
Process
Process[] processes = Process.GetProcessesByName("someName"); foreach (Process p in processes) { IntPtr windowHandle = p.MainWindowHandle; // do something with windowHandle }
1.4m articles
1.4m replys
5 comments
57.0k users