using System.Diagnostics;
using System.Runtime.InteropServices;
using System.Windows.Forms;
public class Form1 : Form
{
[DllImport("user32.dll")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
public Form1()
{
Process proc = Process.Start("notepad.exe");
proc.WaitForInputIdle();
Form1.SetParent(proc.MainWindowHandle, this.Handle);
}
}