Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want switch between opened form easily. something like switch between windows on Windows OS should I use MDI Form or I can do it on standard forms too?
Posted
Comments
BillWoodruff 11-Feb-14 10:20am    
There are many ways you could implement this, with or without, MDI. Do you have some ideas about the kind of interface you want on each Form to enable switching ? Do you want to switch in sequence through the Forms in a certain order, or would you like each Form to have a menu from which the user can select any other Form to switch to ? Another technique would be to have an Application HotKey that switches you between open Forms: that brings up the question of which Forms you want to appear in the TaskBar. Of course, with MDI, you get all secondary (child) Forms contained with the one MDI Parent Form, and you get the navigation to any Form menu implemented automatically if you wish, but I'd encourage you to not use MDI simply because it's a rather outdated architecture.
Sergey Alexandrovich Kryukov 11-Feb-14 10:47am    
Good points. I actually answered the question in some way. MDI is not just outdated, I think it is prohibitively bad...
—SA
mit62 11-Feb-14 19:01pm    
thanks Bill. I change my idea. I'm using TabControl.

1 solution

You don't have to use MDI. Moreover, using MDI is discourages by Microsoft and many others, it would be the sure way to add yourself problems and scare off most of your customers. Instead, you can consider other different approaches for presenting the same content on a single form, such as TabControl.

If you still want to have several forms and switch between then, there is nothing to prevent you. All the forms are known to your Application. There is no any embedded predefined method to switch them, just to give you the designer's freedom. You can, for example, handle keyboard events on each forms and shuffle the forms by Ctrl+Tab, Ctrl+Shift+Tab. Most traditional approach is having the list of all open forms in the main menu, under the item "Window". Implementation of any of such options would be pretty trivial.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900