[DllImport("user32.dll", SetLastError = true)] static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent); Process proc = Process.Start( new ProcessStartInfo() { //here I put notepad.exe and it works FileName = Environment.GetEnvironmentVariable("windir") + @"\system32\calc.exe", WindowStyle = ProcessWindowStyle.Minimized }); Thread.Sleep(200); SetParent(proc.MainWindowHandle, this.panel1.Handle);
calc.exe
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)