Launch a shell from another shell.

Topics: CAB & Smart Client Software Factory
Dec 21, 2005 at 8:00 AM
originally posted by: kljones16

We have a situation where we will need to run a CAB application from a another CAB application. Sense Application.Run is used to launch the application we can't use it again on the same thread. We can launch the second shell in a another thread but we also need to set the second application's shell form to be owned by the first application's shell form. Sense the two forms are on different threads we can't pass the parent form into the new thread and use it to set the AddOwnedForm. Or is there a thread safe way to do this or a better way to do this all together?
Dec 21, 2005 at 4:23 PM
originally posted by: BradWilsonMSFT

Honestly? We never designed it to run CAB side by side with CAB inside the same app domain. You will likely have a lot of work to do to get things to properly co-exist, if it's even possible at all.
Dec 23, 2005 at 9:31 PM
originally posted by: PProvost

Perhaps you can explain the business scenario you are trying to address? There may be another approach...
Dec 28, 2005 at 7:34 AM
originally posted by: kljones16

For a future release we will be converting our suite of 15 applications to use CAB. Many of the applications are small (one/two workitems) and a few are large (several workitems). Currently, each application will be using a common shell and have a main workitem. In some cases a workitem will run workitems from other applications merging UI into the same shell. In other cases applications have so much going on in the UI department that we would rather load the application in its own shell\form so that it doesn’t merge all its menu items and smartparts into the calling application.

What we are looking into is creating is a window workspace that creates forms similar to our shell. However the problem is going to be getting workitems to use the menu and toolbar in the form provided by the workspace. Sense we developed our own UIElementAdapter we might be able to work through some of the problems but we are thinking we will see conflicts among Command Handlers.

If we can’t get this to work we may have to take another look at using another thread again.