How do I get the handle of a console application’s window

Not sure it works, but you can try that :

IntPtr handle = Process.GetCurrentProcess().MainWindowHandle;

Leave a Comment