I need to open an .exe inside a Windows form in C #, how to proceed with it. I already researched the net and found the following example:
[DllImport("user32.dll", EntryPoint = "SetParent")]
public static extern IntPtr SetParent(IntPtr hWndChild, IntPtr hWndNewParent);
Process p = Process.Start(@"d:\TesteCS.exe");
Thread.Sleep(500);
SetParent(p.MainWindowHandle, panel1.Handle);
.exe opens but stays the exact size of it and needs to be maximized.