J
James X. Li
Hi everyone,
I want to add a feature to my C# application to allow it to
duplicate itself, just like the ctrl-N key to cause the Internet Explorer to
duplicate its window. I could easily implement this feature by starting
the application as a new process via a System.Diagnostics.Process.Start()
call.
But I have heard that AppDomain should provide a faster way to do this kind
of job. So I created an AppDomain in my application and used
ExecuteAssembly() to start the application in the new appdomain.
The application got restarted with a new window and worked
smoothly. However, the new appdomain is still dependent
on the parent appdomain : if I close the parent appdomain, all child
appdomains got closed too.
My question is: Is there a way to make a child appdomain completely
independent from the parent appdomain?
Another problem is that, after the child appdomain opened its main window,
the parent appdomain stopped receiving shortcut key strikes for all menus.
If I closed the child appdomain, the shortcut keys for the parent appdomain
work again. This kind of dependency make AppDomain totally unsuitable for
my task. Or, did I do something wrong when creating the appdomains?
Thanks in advance,
James
I want to add a feature to my C# application to allow it to
duplicate itself, just like the ctrl-N key to cause the Internet Explorer to
duplicate its window. I could easily implement this feature by starting
the application as a new process via a System.Diagnostics.Process.Start()
call.
But I have heard that AppDomain should provide a faster way to do this kind
of job. So I created an AppDomain in my application and used
ExecuteAssembly() to start the application in the new appdomain.
The application got restarted with a new window and worked
smoothly. However, the new appdomain is still dependent
on the parent appdomain : if I close the parent appdomain, all child
appdomains got closed too.
My question is: Is there a way to make a child appdomain completely
independent from the parent appdomain?
Another problem is that, after the child appdomain opened its main window,
the parent appdomain stopped receiving shortcut key strikes for all menus.
If I closed the child appdomain, the shortcut keys for the parent appdomain
work again. This kind of dependency make AppDomain totally unsuitable for
my task. Or, did I do something wrong when creating the appdomains?
Thanks in advance,
James