views:

403

answers:

4

I'd like to create a workspace with status bar and menu, and within this workspace container have smaller windows of various types.

For example, if you un-maximise a worksheet in Excel but not the main window, it becomes a window in a larger workspace.

I've tried searching for the result but the main problem is in knowing the right terminology.

+3  A: 

You want an MDI (Multiple Document Interface) Form

Just set the IsMdiContainer property of your main form to True, and you should be able to add other forms as mdi children.

Joel Coehoorn
+1  A: 

Check into MDI programming. Here's a couple links

Creating an MDI Application (CodeProject)

Developing MDI Application in C# (C-Sharp Corner)

scottm
+1  A: 

On a Windows Forms form, there is the IsMdiContainer property. Setting that will make the form an MDI (multiple document interface) parent. Any window you want to appear as a child of the parent, just set the MdiParent to the form you have IsMdiContainer set to true for. Be aware that WPF does not support MDI. A suggestion may be to try a tabbed interface, like many web browsers have if you're using WPF (or even if you're not).

BTW, Excel doesn't work that way anymore, and I believe Microsoft has pretty much abandoned MDI. Just FYI.

Robert C. Barth
+1  A: 

That "workspace" will be ordinary Form instance with IsMdiContainer property set to "true", all inner windows (other instances of the Form class) must have their MdiParent property set to that outer form. You can add status bar and menu (as any other controls) as you do this for any other forms.

"Form.IsMdiContainer Property" article in MSDN have good example on how to use this.

Dmitriy Matveev