mdi workspace childforms loaded but not visible

Topics: CAB & Smart Client Software Factory
Dec 14, 2005 at 1:11 AM
originally posted by: LievenBoving

I've created a shell with ShellForm a deckworkpace on the right side and a custom workspace on the left side.
I have deleted my deckworkspace and set my form to ismdicontainer.
In the Aftershellcreated i've added an mdiworkspace.
like this.


I my workitems i call the just do the following

if (parentWorkItem.Workspaces.Contains("MDI"))

public void Run(IWorkspace window)
IMyView view = this.Items.AddNew<MyControl>();

WindowSmartPartInfo info;
info = new WindowSmartPartInfo();
info.Title = "Test Window";
info.Width = 100;
info.Height = 500;
MyPresenter presenter = new MyPresenter(view);
info.Modal = true;



This is the way i follow to show mdi child forms in my main form
However i do not understand how the mdi workspace knows what is his parent form.
The code does not crash but my child form is not visible.

Any help would be very nice..
Dec 24, 2005 at 7:15 PM
originally posted by: KristianPaul

When creating your MDI workspace, you need to specify the form to be used as the MDI parent.

Dim mdi As New MdiWorkspace(MyBase.Shell)
RootWorkItem.Workspaces.Add(mdi, "MDI")