Last post Jun 30, 2008 05:59 PM by RajVedula
Jun 28, 2007 09:10 AM|kfuller|LINK
I am attempting to write a wrapper program that will allow access to various applications for the user. The goal being that my wrapper application will have some form of program navigation and a single panel or frame in which I would load external programs.
In doing so the user will not need to worry about minimizing and maximizing windows to switch between programs.
I have no issues using System.Diagnostics.Process to launch external applications. That is easy. As is launching IE within my app in a predefined frame or panel.
What I can't find is how I can launch an external application (i.e. a standard windows exe) in the confines of a panel or frame. Can this be done? I haven't found anything after searching various related keywords in google so I'm hoping that maybe someone
checking out the forum might have an idea if this is possible with other console exe's.
Thanks for your time and assistance,
Jul 02, 2007 10:47 PM|Rex Lin - MSFT|LINK
I am not sure
whether you are working with a WinForm or WebForm application.
So let's take into two parts:
Asp.net with IIS runs as a service application, which means that it runs under another Window Station and Desktop. However,
in Windows, the default visible Window Station and Desktop is WinSta0\Default, which is where the Shell(explorer.exe) runs. So the notepad.exe you created is displayed in an invisible desktop.
To display the GUI from a non-visible service application, you have to break the security sandbox of WinSta0\Default, which is a little complex.
2.1If the external applications you are trying to launch are console applications, we can try redirecting the
console output to some stream. Here is the sample:
2.2 If the external application are WinForm applications, it would be much more difficult to deal with. We can
use the SetParent API to change the window parents. However, the effect will never be perfect.
If i misunderstand you about your question, please feel free to correct me and i will try to help you with more
I hope the above information will be helpful. If you have any issues or concerns, please let me know. It's my pleasure to be
Jul 03, 2007 08:16 AM|kfuller|LINK
Thanks for the excellent information. I am dealing with WinForm for my primary application, so #2 above is what I'm going to try out. As for the console apps that I want to launch and force into a panel/frame/etc, they are mostly older VB6 applications
that do various odd processes. I don't have the time to recode them and integrate their functions into my app so launching them is my only option at this time.
I'll give #2 a shot and will post again if something isn't working for me.
Jul 05, 2007 02:44 AM|Rex Lin - MSFT|LINK
HI, kfuller :
We are marking this issue as "Answered". If you have any new findings or concerns, please feel free to unmark the issue.
Thanks for your understanding.
Jun 30, 2008 05:59 PM|RajVedula|LINK
I have win32 app which i need to be opened in a panel on a windows form and i wasnt sure how to set the output from the process to the panel.Any help is appreciated.
//panel1. == s?????
Open exe in a panel in a net application