Running External App within project

jdavis2

Member
Joined
Nov 2, 2006
Messages
12
Programming Experience
Beginner
Hello all,

Is it possible to run a external application within your .net program.

For instance : I want to have a form with various controls on it, then a groupbox/panel or even a blank area that will house a external app. Maybe wordpad or a telnet window. Basically have the application run like normal but locked into a fixed location on the form, so when I minimize the window it minimizes, and it moves with the form ect... Thanks!
 
As nobody has replied, im going to say that I personally have not seen anything like this, and I woulden't think that it is possible, unless you use some serious API trickery (telling windows to move the application window etc).

I could be wrong though, can sombody clarify?


Hope you figure a work around out :)
 
Just been giving this some thought and it is possible and it would take a bit of Win32 API but not that much once you have the window handle. Satrting the process is a simple step..

VB.NET:
System.Diagnostics.Process.Start(..)


Then all you really need is to get the window handle of notepad using FindWindowEx once you have the window handle it will just be a matter of using the MoveWindow function or SetWindowPos function in the move event of the form to update it's location.
 
Well in all my newbness glory I will give it a shot haha. Both response seem like a reasonable solution. Running with your guys idea how does this sound.

Put 4 points on a form "not sure which component to use for the points yet" and then using the move event for the form have the external app stay a certain ratio away from each point. That way the window can be move/resized. Then of course use the anchor property to hold each point to a fixed location. I will ticker today with it, thanks for the input because I was going in a completely different direction with it :)

Of course anymore ideas are appreciated.

** If anyone can give me a bit of information on how to use the FindWindowEx function I would greatly appreciate it. The Msdn library is lacking in how to use it. Well at least to me.... :( I prefer to use vb.net language but if nessecary it doesnt matter.
 
Last edited:
Back
Top