Convert MDI to SDI

J

Jon

We have an application written in VB6 which performs a lot of different
functionality for a helpdesk (create orders, create invoices, manage
employees, etc). It's written as an MDI application. Nearly everything I see
says MDI is really not a great design choice and I somewhat agree with that.
So, as we go over concepts for rewriting this app in .Net 2, I'm trying to
come up with how to convert it to an SDI application. We have nearly 150
different mdi child forms in the app, about 30 of those are directly
accessible from menu items, the others are forms that come up when using
those 30 main function forms.

Do you have a main form with your menus and task options which is always
shown and then simply open the new functional forms as standard windows
forms that will have their own taskbar item and menu bar, etc? (this seems
like the type of interface that outlook uses - the main frame of the
application and then a new form to write an email or open a task in). I
think this is the right design method, I'm just having trouble wrapping my
brain around the right method.

Thanks for any ideas on how this should be designed.
 
R

Robbe Morris [C# MVP]

You would want to create a separate Menu class that renders various
MenuItems. Each would raise events on the Menu class. In those
events, you'd launch whatever form class (or other item) that you need.

The idea being that you wouldn't attach the menu code itself to an
MDI or other form entity.

This helps greatly with drawing the same (or similar) menus for
right clicks or displaying a similar menu on another form. All the
menu items end up getting routed through a single set of code.

--
Robbe Morris - 2004-2006 Microsoft MVP C#
I've mapped the database to .NET class properties and methods to
implement an multi-layered object oriented environment for your
data access layer. Thus, you should rarely ever have to type the words
SqlCommand, SqlDataAdapter, or SqlConnection again.
http://www.eggheadcafe.com/articles/adonet_source_code_generator.asp
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top