views:

75

answers:

1

I am creating a Windows Mobile Application in C# and Visual Studio 2008.

The application will have 5-6 main 'screens'. There will also be bar (/area) with information (e.g. a title, whether the app is busy, etc) above the screens, and a toolbar (or similar control) below the screens with 5-6 buttons (with images) to change the active screen (i.e. the screens will share the top bar and toolbar)

What is the best way to implement this?

  1. Use multiple forms, and just include the toolbar and top-bar in each
  2. Use a single form and something like the Tab control (but customised) to contain the screens
  3. Something else?

Keeping in mind a) memory usage and b) time to switch screens.

Thanks in advance. Any links, pointers etc are much appreciated.

+2  A: 

Use a single Form and fill the center with UserControls. You can explicitly Dispose the UCs when appropriate.

Henk Holterman
I have tried both single and multi-form approaches, and a i don't really like either way. When using multiple Form classes you have to pass lots of data in to the new form classes to reference your data, and to reference the other forms. The other way to handle multiple forms is to set up a form controller that has references to all the forms and then the current visible form can request it to open another form. Yuk.The single form approach let's you skip all that worry. So yes, use a custom control or a Panel/Frame/Group as your "screen" and show/hide those
Fuzz