views:

442

answers:

4

I am designing an installer interface for a already written program. It is my first windows.form. I see three approaches to solving my "problem" of needing multiple "screens". I can add all the labels/buttons/interface, and then hide/show them at events. Or I can close and open a new windows? Or do I somehow load my next form into the window frame (sortv like an iFrame approach)? Can somehow help explain how to do this?

Thanks!

+1  A: 

Though there is nothing stopping you from using any of the approaches that you mentioned, using separate windows and opening/closing them would be cleaner. If the code for individual windows gets complicated it would be clearer if they were separate.

Since you said you are doing installer's particulary take a look at Wix. It was meant to be used for creating installer's. It has it's own approach of building UI from XML's.

Pradeep
A: 

I would design my "screens" as unique frames with each frame having the controls it needed. Then I would just swap them in and out of the main window.

Its sort of like an IFrame (visually at least).

sylvanaar
A: 

I agree that WiX is worth a look. An alternative to WiX that some people like more (it's just different, some people like one approach, some like the other) is NSIS.

When I have a requirement that calls for swapping out the controls in a single window, I tend to create a user control for each "page".

Eric J.
A: 

Have you considered using The Panel control? You can group certain controls together and have them placed inside one or more Panels.

You could Hide/Show each panel when required.

baeltazor