0

I am creating a windows mobile application that has several different screens. At the bottom of each screen is a menu bar which the user can click on to navigate each screen.

My question is should I use a new form for each screen and clone the menu or use one form and have all the other screens as a control and add them to the main form?

Cheers

ctacke
  • 66,480
  • 18
  • 94
  • 155
Scott
  • 281
  • 2
  • 8

3 Answers3

1

Per this link, there is no MDI functionality in Windows Mobile.

In our application, we use different forms for each screen.

There are two ways to open up new windows:

  1. formName.ShowDialog(): the new screen will be opened as a child of the other screen. In this case, you won't be able to access your parent form until the child is closed.

  2. formName.Show(): the new screen will NOT be opened as a child of the other screen. Hence, you can access your parent even if the child is not closed.

thecoolmacdude
  • 2,036
  • 1
  • 23
  • 38
1

I'd vote for controls.

Both mechanisms can achieve the flow you want, and from a fundamental perspective neither is going to really be worse (as in load times, memory consumed, or what have you) so it's largely a personal style decision. Me, I use a UI framework that lends itself heavily to UserControls, so that's what I use.

Generally speaking, when I create an app I have a single parent/host form that has Workspaces where I put my Views. Thos Views are UserControls. Whether I use a tabbed workspace or a desk workspace, they still end up as Controls. The only reason I use more than one full-up Form is if I have a dialog (warnings, inputs, etc) where I will be doing a ShowDialog call.

ctacke
  • 66,480
  • 18
  • 94
  • 155
1

You can use TabControl in single form with each tab having it's own controls. No need to add controls dynamically. And one single form. The way to achieve this is discussed in more detail in this answer.

Creating Wizards for Windows Forms in C#

Community
  • 1
  • 1
Ankush
  • 2,454
  • 2
  • 21
  • 27