Natively it is not possible, but you can call internal methods from user32.dll
to make this possible. Call the method SetPointerParent
with the target executable and the control that will be displayed.
using System.Runtime.InteropServices;
[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hwc, IntPtr hwp);
protected internal IntPtr SetPointerParent(string exename, Control parent)
{
Process p = Process.Start(exename);
System.Threading.Thread.Sleep(500);
p.WaitForInputIdle();
IntPtr hw = p.MainWindowHandle;
IntPtr hc = parent.Handle;
SetParent(hw, hc);
return hw;
}