Visual Basic -- Difference(s) betwe

June 12, 2005 at 21:03:58
Specs: WinXP, 3.2GZ

Hello fellow programmers...

I am programming in VB for two years now. But have yet to learn the difference between MDI and Regular form as I have never programmed or came across a MDI form so I do not know what it is and why is it better/worse then just regular form...

any replies with explanation is greatly appreciated!



See More: Visual Basic -- Difference(s) betwe

Report •

June 13, 2005 at 02:42:57

There is nothing better or worse about a MDI form, just different. A MDI form acts as a container for regular forms which are child forms of the MDI. When a MDI form closes, all its child forms close with it. There can only be one MDI for for each application.

The VB IDE itself is a MDI applications are most of the MS applications.

The easiest way to find out about MDI forms is to jump in and use one. You will soon discovers its capabilities and limitations.


Report •

June 13, 2005 at 04:29:06

that should have been most of the MS Office applications.


Report •

June 13, 2005 at 06:29:31

They are dead simple in VB6, as well as .NET. All you do is specify that one is a MDI container and then set the is MDIChild property on all other forms you want to show up inside the container.

NOTE: You cannot show vbmodal an MDI do not make your dialog boxes MDI children.

Good Luck,

They mostly come at night...mostly.

Report •

Related Solutions

June 13, 2005 at 09:37:25

Thanks Stuart and Chi...

However Chi, I heard that there were something that you could do easily with the regular forms (frm) then on MDI forms....

For example, I found a snippet of code that would allow to do some function... I read comments on the source code that people were saying that they "could not get the MDI forms to behave that way... everything else was good"

So what are the advantages on using MDI forms? WHY would you need to use it?

or WHY do people/programmers use it?

what is so special about it that programmers include it in their projects?

Report •

June 13, 2005 at 10:43:51

Think about MS Word. It allows you to have multiple documents open at one time. With a MDI you would need to open up a new instance of Word if you wanted to have more than one document open at one time.

Most controls will not go onto a MDI form. Those that do must have the align property which forces them to align to the top of bottom of the form.

When used in the right place at the right time for the right purpose, a MDI application can make the programmers job a lot easier.

As I said earlier, the only way to find out is to jump in and try it. Alternatively read the VB help files - it is full of information about MDI and SDI interfaces and the pros and cons of both.


Report •

June 13, 2005 at 11:49:12

BeachCrab Stuart is right in programming the best way to get advantages or disadvantages is to use them it will open all facts in front of you....
MDI will allow you to control all your forms right from one place....track them close them and alot other and when the container is closed all are closed. next if container is minimzed all forms are minimized and alot more like this......
Best Examples of these are Microsoft Office applications,Opera etc......
MDI are required are not it all depends on your requirements.....

Report •

Ask Question