سلام. خب خطا رو میزاشتید تا بررسی بشه
کد زیر رو تست کنید
using System.Runtime.InteropServices;
using System.Diagnostics;
[DllImport("USER32.DLL")]
static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
[DllImport("USER32.dll")]
private static extern bool MoveWindow(IntPtr hwnd, int x, int y, int cx, int cy, bool repaint);
private void Form1_Load(object sender, EventArgs e) {
Process process = Process.Start("notepad.exe");
process.WaitForInputIdle();
SetParent(process.MainWindowHandle, this.panel1.Handle);
MoveWindow(process.MainWindowHandle, 0, 0, this.Width - 90, this.Height, true);
}