run exe from within a form, and keep the exe within the boundaries of that form.

kevinrea

New member
Joined
Oct 12, 2017
Messages
1
Programming Experience
Beginner
I want to run an exe or two from inside a windows form. now, i have found a few examples of these on this board, but, I want to be able to keep the exe inside the boundary of the actual form I create in C#. I am using Visual Studio 2013.


thanks very much for your help,
Kevin Rea
Lancaster, Calif. USA
 
You'll be able to find examples of this around so I won't write another one. You can run the EXE by calling Process.Start. You'll then have a Process object. That object MainWindowHandle property, which will have a value if the process actually does have a main window. You can then invoke the SetParent function from the Windows API to make your form or a control on your form the parent of that main window.
 
Back
Top Bottom