C# get window handle after starting a process

James Cadd picture James Cadd · Sep 14, 2009 · Viewed 19.3k times · Source

Is there a way to get the window handle (IntPtr) for a window after its launched from a C# app with Process.Start()?

Answer

Noldorin picture Noldorin · Sep 14, 2009

If it's the main window you're after, Process.MainWindowHandle will give you what you need.