2
I need to open a . exe inside a Windows form in C#, how to proceed with this. I already searched 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);
the . exe opens but stays at the exact size of it and need it to be maximized.
So but if I put this code it does not present the . exe inside my Windows Forms and yes outside my main application.
– Deivid Farias
Ah, I hadn’t read the whole question. I guess you won’t be able to do it so simply don’t.
– Jéf Bueno