New Windows inside Application with CAB

Topics: CAB & Smart Client Software Factory
Feb 4, 2006 at 12:26 AM
originally posted by: tbremeyer

Assume we have an Outlook like application built with CAB. What would be the recommended way to show a new form in that application? None of the BankTeller Samples from the Hands On Lab show that.

Is there an example that would show how to do that?

Thank you for any help.
Feb 4, 2006 at 1:21 AM
originally posted by: tomerdr

If you mean to open a new form just like when you add new contact to outlook
the sample EventBrokerQuickStart contains such a thing.

I too try to create an outlook like application,
this is my third day with cab and i really like it.

Feb 4, 2006 at 5:27 AM
originally posted by: DLorenz

If you are using a DeckWorkspace somewhere, you can simply run another WorkItem and have it show smartparts on that Workspace. If you are using the ZoneWorkspace, then you should put a DeckWorkspace somewhere inside of it.
Feb 4, 2006 at 1:05 PM
originally posted by: ChrisHolmes

If you want to open a brand new window you can use a WindowWorkspace and then run a WorkItem in it. This is why the WindowWorkspace exists.

For instance, upon a button click, if you wanted to open a separate (modeless) window and run a WorkItem in it, you can do this:

WindowWorkSpace wws = parentWorkItem.Workspaces.AddNew<WindowWorkspace>();
MyWorkItem workItem = parentWorkItem.Items.AddNew<MyWorkItem>();

// Then overload the workItems Run() method to accept a IWorkSpace and call the Run() method, passing in your WindowWorkSpace:


A new WindowWorkspace will launch and your WorkItem will run in it.

Now, if you want to open a duplicate of your shell application, however, that won't work (from what I can tell). CAB doesn't allow you to run a new ShellApplication in the same AppDomain thread.
Feb 7, 2006 at 9:57 AM
originally posted by: tomerdr

What about toolbars and menu in this window?
should i add them all at run time?

Feb 7, 2006 at 10:10 AM
originally posted by: tomerdr

Opps sorry i got the idea