Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using Visual Studio 2012 (c#), I would like to use 1 single window that holds different screens. The tutorials I've seen up till now have suggested to use Forms; telling the form to "Close" or "Hide". But the issue with this method is that it closes the window and creates a new one. This leaves a moment where you see a window close and another open (when this should all be contained to one window)

I would like to have one window as a container that can modify what is displayed on it based on the button pressed.

Any suggestions or methods?

share|improve this question
up vote 1 down vote accepted

It sounds to me like you may be looking for MDI (Multiple Document Interface).

There are many tutorials on the Internet about implementing one with C#.

Here's one over at Code Project for instance.

Otherwise you're probably looking at using a single form, but having containers of controls (panels, etc.) that are hidden and shown on demand. This seems easier at first, but can get very messy (and slow) when you get to the point of having many controls on many panels, but still all on one form. :)

share|improve this answer
I really just needed to know what to research, i've been trying different keywords for a while but never came across MDI. Let me give that a shot. – Dmor574 Aug 16 '12 at 23:01
Is this how applications such as (for example) Visual Studio itself is made? with an upper level window holding subwindows? – Dmor574 Aug 16 '12 at 23:02
Depends on your definition of a "window" a bit, but in general, yes I'd say VS is a MDI. Whether it actually still uses the traditional Windows Forms MDI technologies these days is not something I can comment on (as I don't know). :) – Ƭᴇcʜιᴇ007 Aug 16 '12 at 23:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.