Dear Friends,

i have developed a software which have Mdi contianer, the problem is that,

1. when i click on the empty space of the main form i.e (Mdi container FORM) all other windows goes behind this Mdi container window
*I would like then to stay on top of the Mdi container from*

2. when i minimize any other form (other then Mdi container form) it minimized to the Taskbar
*I would like it to minimize in the Mdi container window (not on the taskbar)*

Please any body solve this problem please :(

Recommended Answers

All 8 Replies

sounds like your child forms don't have the MdiParent property set to the instance of the mdi form.

when you create your child forms you should set the MdiParent property on the form, and be sure that the mdi paretn form has the isMDIContainer property set to true.

Form2 thechildform = new Form2();

thechildform.MdiParent = this; //sounds like you are missing this.

thechildform.Show();

Superb Work my Dear Friend...:)

and Thanx alot... u done it yaar... :cool:


..::PROBLEM SOLVED::..

Dear Friend,

Now i got another problem... the method u told me works, but

now the Child Form menu bar displayed on the Parent Form's Menu :(

Dear Friend,

Now i got another problem... the method u told me works, but

now the Child Form menu bar displayed on the Parent Form's Menu :(

You should create the menubar on both forms.............

Yes that in menu merge system, its all the rage in forms applications. If you ever used a mac you will notice that all applications you ever open do this, and the file menu is always visible on the desk top.

the menu's for each bar will always merge with the parent container, there is a property that you can change that will influence this, but not stop if from happening. As far as I know you can't easily prevent it.

This question may go furthermore unanswered.

Yes you are right...

But i got another solution for this problem...

:icon_idea: I have deleted all the MenuStrips from the child forms and uses the ToolStrip instead of MenuStrip... and ToolStrip didn't merge with the Parent's Menu.

and now it works Perfect.. and my ToolStrip looks just like a MenuStrip
:)

glad to hear it! might want to mark this thread as solved.

good luck with your application.

Thanx Dear "Diamonddrake " and "avirag" for helping me...

Thanx alot :)

Problem Solved Successfully...
:)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.