Home » C# Programming

how to Develop an windows mobile application with multiple forms?

How to develop windows mobile apps with multiple forms? we are developing an app which contains approximately 40+ screens i am confused whether

1.To use multiple forms that is one form for each screen.
2.Or is there any other method to achieve this?
3.Though not more than one form will be active all the time? does it consumes more device memory if we use that many forms?

and between no screens are same each are different any idea on this will be really helpful


8 Answers Found


Answer 1

1.To use multiple  forms that is one form  for each screen.

Select Windows CE 5.0 Project while u r creating new project. If you already have, the application  on different platforms like Windows Mobile 5.0 just change platform from WM5.0 to Windwos CE 5.0 ( Project menu --> Change target platform)

2.Or is there any other method  to achieve  this?

refer to the above

3.Though not more than one form will be active  all the time? does it consumes  more device  memory if we use that many forms?

Always try to keep open parent form and keep closing the child forms  and try to use single ton pattern. This way does not consume much memory. Dont come to the conculsion whether the application is slow by testing only on emulator. Please test it on device as device is faster than emulator.


Answer 2

My question is if we create 50 forms  in application  but only 2 forms are active  at any given time  does it consume more mobile/device memory? though i guess it increases the application size i guess it does not take any memory  on system RAM unless and until we declare or activate the form  am i rite?


Answer 3


Every new instance of a form  takes some memory, so the definitely more memory  is consumed. As to how much more is taken, the Remote Performance Monitor tool can tell you:

Analyzing Device Application Performance with the .Net Compact Framework Remote Performance Monitor
(Video)How Do I: Detect Managed Memory Leaks Using Remote Performance Monitor?


Chunsheng Tang


Answer 4

Hi Manjunath,

As Chunsheng Tang stated it occupies. but to reduce the memory  consumption, try not to place any controls on the parent form  specially which consumes  more memory like image list,.....

The link which is provides really helps to work on optimization(speed, memory occupation,..)  and it only works from CF2.0 SP1.




Answer 5

Thanks for the Reply

As we have to start UI coding from next week can u suggest whether

1.  Is it normal to use 55 forms  for the mobile  application though only two forms are active all the time..............


2.  do we have to use Panels though i thought of using panels managing all the 50 screens  on one form  using panel is very confusing any idea  whether to use panel or forms?

Manjunath c.v



Answer 6

1.It’s not quite normal to maintain an instance for every form  in your application  at the same time. The users never use them at the same time; instead they usually use a small portion of them within a certain period of time.

The first option you can use to optimize your application is using “lazy initialization”, which means you do not create an instance of a form until it is being accessed.

Another option is applying some kind of caching policy. For example, you can choose to maintain a maximum of 10 form instances which are most lately (or frequently) accessed; or you can dispose a form after it hasn’t been used for a certain period of time.

2.Using switchable user controls should save some memory, though I don’t think the difference is significant, so maybe you can just choose the one you are more familiar with. Whatever way you choose, you need to make a compromise; and the Remote Performance Tool will help you in this regard.

Besides, there is a Compact Composite UI Application Block included in the Mobile Client Software Factory which aims to help you build a better UI. You don’t have to use it but the guidelines might be helpful to you:



Answer 7

Hello Manjunath,

How did you develop  this application  with multi forms  on windows  mobile. Can you please tell me which tell me which pattern you adopted.


Answer 8

I am also wondering which method  is best for Mobile programming with multiple  forms.

Parent Form, Main Method, Panels (?)

I am creating a project with multiple forms  and I am finding it very difficult to navigate through forms.



<< Previous      Next >>

Microsoft   |   Windows   |   Visual Studio   |   Sharepoint   |   Azure