AppDomains - App within an App

  • Thread starter Thread starter coder4
  • Start date Start date
C

coder4

Within an application, I want to run a second application--with it's
own separate AppDomain.

I'd like to run this second application in a "full-screen
mode" (outside the first application) or inside a panel of the first
application. Is this possible?

Is it possible to add the main form of the 2nd application as a
control to the panel of the first application and still have it run in
it's own AppDomain?

If so, please explain.

Thanks!
 
Hello (e-mail address removed),
I'd like to run this second application in a "full-screen
mode" (outside the first application) or inside a panel of the first
application. Is this possible?

afaik u need to use WinAPI SetParent() function (http://pinvoke.net/default.aspx/user32/SetParent.html)
, and point to the handle of your first app panel window

---
WBR, Michael Nemtsev [C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangel
 
You probably could run the second application in full screen mode,
assuming that the second application was running it's own message loop.
However, I don't see the benefit to doing such a thing.

Also, you won't be able to run a second app as a child to a first app in
a second app domain, as you would need a second message loop, and AFAIK, you
can't parent a window in a second message loop/thread to a window in a
seprate message loop/thread.

Also, application domains are not meant for this purpose. They are not
ways of stuffing what should rightfully be in another process into your own.

I would recommend taking your UI from the second app and then factoring
it out into another assembly such that it can be called from your first
application. Then, you can add a reference to the library you created and
show elements from that library in your first app.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top