views:

138

answers:

2

I recently wanted/thought I need a form with two child forms to switch between according to user's selection of a TreeNode.

While searching the web I found this post saying this need is a flaw in my design. Why?

Why are multiple dialogs bad for the CF? Doesn't my usage scenario require this?

If there is support and it is OK to use this, can you point me to it?

Thanks.

+4  A: 

The CF doesn't support it because the OS itself doesn't support MDI (see the Remarks section in the linked page).

MDI can be pretty easily faked, though, by using UserControls instead of Forms and throwing them in a container like a Frame on your "MDI Parent" Form.

You could also go with a Tab Control motif, and each "document" becomes a tab.

ctacke
+3  A: 

In addition to ctacke's answer, remember this, CF is a very small subset of the desktop windows that we all love/hate, such as XP,Vista,Windows 7, including server editions, i.e. the API calls on a CF is smaller as the CF has limited resources such as memory, storage space (I will refuse to define this as disk space as the distinction on the CF is blurred - i.e. flash ram, sd cards, compact flash cards and so on but no hard disk of any kind!) and limited no of connectivity (blue tooth and compact flash - in my experience) and finally a much smaller screen with limited estate.

Really, programming under a CF, is a la-la land as some things that you can do on desktop Windows, you cannot do on CF hence with CF you have to think outside of the box to get around something despite having a smaller set of API's. Like ctacke's answer that is a very good way of 'faking' an MDI.

Hope this answer helps you understand why no MDI exists on CF, Best regards, Tom.

tommieb75

related questions