Hi,

I have an MDI container form (Form1) that has a MenuStrip and a ToolStrip
embedded in a ToolStripContainer. Form1.MainMenuStrip is set to MenuStrip1.
The "Content" part has a ToolStripPanel docked to Fill the entire space. I
guess this is a pretty normal setup.

The problem is that all Mdi childs are invisible. They open up under the
ToolStripContainer, making them invisible.

What am I doing wrong? I open the Mdi childs like this:

Form2 frm = new Form2();
frm.MdiParent = this;
frm.Show();

Thanks a lot for your help!

Re: ToolStripContainer and MDI applications? by Carl

Carl
Thu Sep 15 16:28:37 CDT 2005

I should specify this code is for .NET 2.0...

"Carl Mercier" <info@carl-mercier_no_spam_pleeze_.com> a écrit dans le
message de news: OWr5zvjuFHA.3152@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have an MDI container form (Form1) that has a MenuStrip and a ToolStrip
> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
> MenuStrip1.
> The "Content" part has a ToolStripPanel docked to Fill the entire space.
> I
> guess this is a pretty normal setup.
>
> The problem is that all Mdi childs are invisible. They open up under the
> ToolStripContainer, making them invisible.
>
> What am I doing wrong? I open the Mdi childs like this:
>
> Form2 frm = new Form2();
> frm.MdiParent = this;
> frm.Show();
>
> Thanks a lot for your help!
>
>
>



RE: ToolStripContainer and MDI applications? by TaylorMichaelL

TaylorMichaelL
Thu Sep 15 20:32:01 CDT 2005

Why do you have a ToolStripPanel docked inside the content panel of your
container? This is probably causing (due to z-order) the panel to show up
over your MDI children. Dock your MDI children directly in the content panel
(Controls) instead of dropping a ToolStripPanel into it. Your MDI children
should show up. The content panel is designed to house non-ToolStrip
controls such as Forms. Normally people dock controls but I believe a form
would work as well since it is a control.

Michael Taylor - 9/15/05

"Carl Mercier" wrote:

> Hi,
>
> I have an MDI container form (Form1) that has a MenuStrip and a ToolStrip
> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to MenuStrip1.
> The "Content" part has a ToolStripPanel docked to Fill the entire space. I
> guess this is a pretty normal setup.
>
> The problem is that all Mdi childs are invisible. They open up under the
> ToolStripContainer, making them invisible.
>
> What am I doing wrong? I open the Mdi childs like this:
>
> Form2 frm = new Form2();
> frm.MdiParent = this;
> frm.Show();
>
> Thanks a lot for your help!
>
>
>
>

Re: ToolStripContainer and MDI applications? by Carl

Carl
Thu Sep 15 21:08:07 CDT 2005

Hi!

Even with no ToolStripPanel, the problem happens. I read somewhere that
this control might fix my problem, that's why I added it. I also liked its
blue background on XP-Luna!

Carl


"TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> a écrit dans le
message de news: FE71EDFC-0EBA-4796-A914-1A7106BA16C7@microsoft.com...
> Why do you have a ToolStripPanel docked inside the content panel of your
> container? This is probably causing (due to z-order) the panel to show up
> over your MDI children. Dock your MDI children directly in the content
> panel
> (Controls) instead of dropping a ToolStripPanel into it. Your MDI
> children
> should show up. The content panel is designed to house non-ToolStrip
> controls such as Forms. Normally people dock controls but I believe a
> form
> would work as well since it is a control.
>
> Michael Taylor - 9/15/05
>
> "Carl Mercier" wrote:
>
>> Hi,
>>
>> I have an MDI container form (Form1) that has a MenuStrip and a ToolStrip
>> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
>> MenuStrip1.
>> The "Content" part has a ToolStripPanel docked to Fill the entire space.
>> I
>> guess this is a pretty normal setup.
>>
>> The problem is that all Mdi childs are invisible. They open up under the
>> ToolStripContainer, making them invisible.
>>
>> What am I doing wrong? I open the Mdi childs like this:
>>
>> Form2 frm = new Form2();
>> frm.MdiParent = this;
>> frm.Show();
>>
>> Thanks a lot for your help!
>>
>>
>>
>>



Re: ToolStripContainer and MDI applications? by TaylorMichaelL

TaylorMichaelL
Fri Sep 16 06:29:02 CDT 2005

Is the form that hosts the ToolStripContainer the one that is also hosting
the MDI children? If so then the container will be taking up the space where
the MDI children normally live. You need to put the MDI children in the
ContentPanel instead. Like I said I've never tried putting MDI children into
the ContentPanel but I have put a single form in there just fine.

Since MS is trying to move everyone away from MDI I wouldn't be surprised if
it doesn't work without some additional coding. Perhaps the better option in
your case is to leave the main form the MDI parent and just add a
ToolStripPanel for each side of the main form you want to be able to dock
controls in. As the docs say there are times when a ToolStripContainer is
not quite what you want so you should add multiple ToolStripPanels instead.
This gives you the docking ability you want and permits the MDI support that
the parent form has to work properly.

Hope this helps,
Michael Taylor - 9/16/05

"Carl Mercier" wrote:

> Hi!
>
> Even with no ToolStripPanel, the problem happens. I read somewhere that
> this control might fix my problem, that's why I added it. I also liked its
> blue background on XP-Luna!
>
> Carl
>
>
> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> a écrit dans le
> message de news: FE71EDFC-0EBA-4796-A914-1A7106BA16C7@microsoft.com...
> > Why do you have a ToolStripPanel docked inside the content panel of your
> > container? This is probably causing (due to z-order) the panel to show up
> > over your MDI children. Dock your MDI children directly in the content
> > panel
> > (Controls) instead of dropping a ToolStripPanel into it. Your MDI
> > children
> > should show up. The content panel is designed to house non-ToolStrip
> > controls such as Forms. Normally people dock controls but I believe a
> > form
> > would work as well since it is a control.
> >
> > Michael Taylor - 9/15/05
> >
> > "Carl Mercier" wrote:
> >
> >> Hi,
> >>
> >> I have an MDI container form (Form1) that has a MenuStrip and a ToolStrip
> >> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
> >> MenuStrip1.
> >> The "Content" part has a ToolStripPanel docked to Fill the entire space.
> >> I
> >> guess this is a pretty normal setup.
> >>
> >> The problem is that all Mdi childs are invisible. They open up under the
> >> ToolStripContainer, making them invisible.
> >>
> >> What am I doing wrong? I open the Mdi childs like this:
> >>
> >> Form2 frm = new Form2();
> >> frm.MdiParent = this;
> >> frm.Show();
> >>
> >> Thanks a lot for your help!
> >>
> >>
> >>
> >>
>
>
>

Re: ToolStripContainer and MDI applications? by Carl

Carl
Fri Sep 16 07:48:09 CDT 2005

Michael,

Thank you for your help. In fact, I was not quite sure what the
ToolStripContainer was for. I thought it would work with MDI forms.

The problem I have without it (which I was trying to solve with the TSC) is
that maximizing windows look weird. The menu strip and tool strip are moved
below the maximized MDI children title bar. I'm not sure if it's a bug with
the strips or if I'm doing something wrong.

Maybe you know the answer?

Thanks!


"TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> wrote in message
news:094B0E94-0987-4586-BF79-6578E2220926@microsoft.com...
> Is the form that hosts the ToolStripContainer the one that is also hosting
> the MDI children? If so then the container will be taking up the space
> where
> the MDI children normally live. You need to put the MDI children in the
> ContentPanel instead. Like I said I've never tried putting MDI children
> into
> the ContentPanel but I have put a single form in there just fine.
>
> Since MS is trying to move everyone away from MDI I wouldn't be surprised
> if
> it doesn't work without some additional coding. Perhaps the better option
> in
> your case is to leave the main form the MDI parent and just add a
> ToolStripPanel for each side of the main form you want to be able to dock
> controls in. As the docs say there are times when a ToolStripContainer is
> not quite what you want so you should add multiple ToolStripPanels
> instead.
> This gives you the docking ability you want and permits the MDI support
> that
> the parent form has to work properly.
>
> Hope this helps,
> Michael Taylor - 9/16/05
>
> "Carl Mercier" wrote:
>
>> Hi!
>>
>> Even with no ToolStripPanel, the problem happens. I read somewhere that
>> this control might fix my problem, that's why I added it. I also liked
>> its
>> blue background on XP-Luna!
>>
>> Carl
>>
>>
>> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> a écrit dans
>> le
>> message de news: FE71EDFC-0EBA-4796-A914-1A7106BA16C7@microsoft.com...
>> > Why do you have a ToolStripPanel docked inside the content panel of
>> > your
>> > container? This is probably causing (due to z-order) the panel to show
>> > up
>> > over your MDI children. Dock your MDI children directly in the content
>> > panel
>> > (Controls) instead of dropping a ToolStripPanel into it. Your MDI
>> > children
>> > should show up. The content panel is designed to house non-ToolStrip
>> > controls such as Forms. Normally people dock controls but I believe a
>> > form
>> > would work as well since it is a control.
>> >
>> > Michael Taylor - 9/15/05
>> >
>> > "Carl Mercier" wrote:
>> >
>> >> Hi,
>> >>
>> >> I have an MDI container form (Form1) that has a MenuStrip and a
>> >> ToolStrip
>> >> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
>> >> MenuStrip1.
>> >> The "Content" part has a ToolStripPanel docked to Fill the entire
>> >> space.
>> >> I
>> >> guess this is a pretty normal setup.
>> >>
>> >> The problem is that all Mdi childs are invisible. They open up under
>> >> the
>> >> ToolStripContainer, making them invisible.
>> >>
>> >> What am I doing wrong? I open the Mdi childs like this:
>> >>
>> >> Form2 frm = new Form2();
>> >> frm.MdiParent = this;
>> >> frm.Show();
>> >>
>> >> Thanks a lot for your help!
>> >>
>> >>
>> >>
>> >>
>>
>>
>>



Re: ToolStripContainer and MDI applications? by TaylorMichaelL

TaylorMichaelL
Fri Sep 16 08:10:02 CDT 2005

Yes, I see your problem. I would say it was a bug but it will probably not
be fixed in time for the release since MS doesn't want people creating MDI
apps anyway. You could probably code around it by either handling the
various events for maximizing the children or by placing a dummy form in the
main form and then use the dummy form as the MDI container. I think you'll
still end up having to manually merge menus and whatnot.

A quick search in the beta forum reveals that the initial behavior you saw
with the container is by design. Some people have had success with
ToolStripPanel and MDI children but there have been issues with menu merges
and whatnot. Code wasn't posted but some people have been able to
successfully get it to work by forcing the panels to dock but again it didn't
work for me. The sample code in MSDN at
ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxmclictl/html/d6b884fc-0846-465f-83c3-5dc0fe93b00f.htm is what I used.

Michael Taylor - 9/16/05

"Carl Mercier" wrote:

> Michael,
>
> Thank you for your help. In fact, I was not quite sure what the
> ToolStripContainer was for. I thought it would work with MDI forms.
>
> The problem I have without it (which I was trying to solve with the TSC) is
> that maximizing windows look weird. The menu strip and tool strip are moved
> below the maximized MDI children title bar. I'm not sure if it's a bug with
> the strips or if I'm doing something wrong.
>
> Maybe you know the answer?
>
> Thanks!
>
>
> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> wrote in message
> news:094B0E94-0987-4586-BF79-6578E2220926@microsoft.com...
> > Is the form that hosts the ToolStripContainer the one that is also hosting
> > the MDI children? If so then the container will be taking up the space
> > where
> > the MDI children normally live. You need to put the MDI children in the
> > ContentPanel instead. Like I said I've never tried putting MDI children
> > into
> > the ContentPanel but I have put a single form in there just fine.
> >
> > Since MS is trying to move everyone away from MDI I wouldn't be surprised
> > if
> > it doesn't work without some additional coding. Perhaps the better option
> > in
> > your case is to leave the main form the MDI parent and just add a
> > ToolStripPanel for each side of the main form you want to be able to dock
> > controls in. As the docs say there are times when a ToolStripContainer is
> > not quite what you want so you should add multiple ToolStripPanels
> > instead.
> > This gives you the docking ability you want and permits the MDI support
> > that
> > the parent form has to work properly.
> >
> > Hope this helps,
> > Michael Taylor - 9/16/05
> >
> > "Carl Mercier" wrote:
> >
> >> Hi!
> >>
> >> Even with no ToolStripPanel, the problem happens. I read somewhere that
> >> this control might fix my problem, that's why I added it. I also liked
> >> its
> >> blue background on XP-Luna!
> >>
> >> Carl
> >>
> >>
> >> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> a écrit dans
> >> le
> >> message de news: FE71EDFC-0EBA-4796-A914-1A7106BA16C7@microsoft.com...
> >> > Why do you have a ToolStripPanel docked inside the content panel of
> >> > your
> >> > container? This is probably causing (due to z-order) the panel to show
> >> > up
> >> > over your MDI children. Dock your MDI children directly in the content
> >> > panel
> >> > (Controls) instead of dropping a ToolStripPanel into it. Your MDI
> >> > children
> >> > should show up. The content panel is designed to house non-ToolStrip
> >> > controls such as Forms. Normally people dock controls but I believe a
> >> > form
> >> > would work as well since it is a control.
> >> >
> >> > Michael Taylor - 9/15/05
> >> >
> >> > "Carl Mercier" wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I have an MDI container form (Form1) that has a MenuStrip and a
> >> >> ToolStrip
> >> >> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
> >> >> MenuStrip1.
> >> >> The "Content" part has a ToolStripPanel docked to Fill the entire
> >> >> space.
> >> >> I
> >> >> guess this is a pretty normal setup.
> >> >>
> >> >> The problem is that all Mdi childs are invisible. They open up under
> >> >> the
> >> >> ToolStripContainer, making them invisible.
> >> >>
> >> >> What am I doing wrong? I open the Mdi childs like this:
> >> >>
> >> >> Form2 frm = new Form2();
> >> >> frm.MdiParent = this;
> >> >> frm.Show();
> >> >>
> >> >> Thanks a lot for your help!
> >> >>
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
>
>
>

Re: ToolStripContainer and MDI applications? by Carl

Carl
Fri Sep 16 08:29:41 CDT 2005

Arg...

Now that sucks. Who is MS to tell me to create or not to create MDI apps!
Just because they decided to go away from it doesn't mean MDI apps are
always "bad" (especially when you upgrade a lecacy app to .NET 2.0).

I guess I'll just play around and hope to find a decent fix.

Thanks Michael!


"TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> wrote in message
news:EC2ECAA0-B85D-479B-9CA3-CC46094052EF@microsoft.com...
> Yes, I see your problem. I would say it was a bug but it will probably
> not
> be fixed in time for the release since MS doesn't want people creating MDI
> apps anyway. You could probably code around it by either handling the
> various events for maximizing the children or by placing a dummy form in
> the
> main form and then use the dummy form as the MDI container. I think
> you'll
> still end up having to manually merge menus and whatnot.
>
> A quick search in the beta forum reveals that the initial behavior you saw
> with the container is by design. Some people have had success with
> ToolStripPanel and MDI children but there have been issues with menu
> merges
> and whatnot. Code wasn't posted but some people have been able to
> successfully get it to work by forcing the panels to dock but again it
> didn't
> work for me. The sample code in MSDN at
> ms-help://MS.MSDNQTR.v80.en/MS.MSDN.v80/MS.VisualStudio.v80.en/dv_fxmclictl/html/d6b884fc-0846-465f-83c3-5dc0fe93b00f.htm
> is what I used.
>
> Michael Taylor - 9/16/05
>
> "Carl Mercier" wrote:
>
>> Michael,
>>
>> Thank you for your help. In fact, I was not quite sure what the
>> ToolStripContainer was for. I thought it would work with MDI forms.
>>
>> The problem I have without it (which I was trying to solve with the TSC)
>> is
>> that maximizing windows look weird. The menu strip and tool strip are
>> moved
>> below the maximized MDI children title bar. I'm not sure if it's a bug
>> with
>> the strips or if I'm doing something wrong.
>>
>> Maybe you know the answer?
>>
>> Thanks!
>>
>>
>> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> wrote in
>> message
>> news:094B0E94-0987-4586-BF79-6578E2220926@microsoft.com...
>> > Is the form that hosts the ToolStripContainer the one that is also
>> > hosting
>> > the MDI children? If so then the container will be taking up the space
>> > where
>> > the MDI children normally live. You need to put the MDI children in
>> > the
>> > ContentPanel instead. Like I said I've never tried putting MDI children
>> > into
>> > the ContentPanel but I have put a single form in there just fine.
>> >
>> > Since MS is trying to move everyone away from MDI I wouldn't be
>> > surprised
>> > if
>> > it doesn't work without some additional coding. Perhaps the better
>> > option
>> > in
>> > your case is to leave the main form the MDI parent and just add a
>> > ToolStripPanel for each side of the main form you want to be able to
>> > dock
>> > controls in. As the docs say there are times when a ToolStripContainer
>> > is
>> > not quite what you want so you should add multiple ToolStripPanels
>> > instead.
>> > This gives you the docking ability you want and permits the MDI support
>> > that
>> > the parent form has to work properly.
>> >
>> > Hope this helps,
>> > Michael Taylor - 9/16/05
>> >
>> > "Carl Mercier" wrote:
>> >
>> >> Hi!
>> >>
>> >> Even with no ToolStripPanel, the problem happens. I read somewhere
>> >> that
>> >> this control might fix my problem, that's why I added it. I also
>> >> liked
>> >> its
>> >> blue background on XP-Luna!
>> >>
>> >> Carl
>> >>
>> >>
>> >> "TaylorMichaelL" <TaylorMichaelL@discussions.microsoft.com> a écrit
>> >> dans
>> >> le
>> >> message de news: FE71EDFC-0EBA-4796-A914-1A7106BA16C7@microsoft.com...
>> >> > Why do you have a ToolStripPanel docked inside the content panel of
>> >> > your
>> >> > container? This is probably causing (due to z-order) the panel to
>> >> > show
>> >> > up
>> >> > over your MDI children. Dock your MDI children directly in the
>> >> > content
>> >> > panel
>> >> > (Controls) instead of dropping a ToolStripPanel into it. Your MDI
>> >> > children
>> >> > should show up. The content panel is designed to house
>> >> > non-ToolStrip
>> >> > controls such as Forms. Normally people dock controls but I believe
>> >> > a
>> >> > form
>> >> > would work as well since it is a control.
>> >> >
>> >> > Michael Taylor - 9/15/05
>> >> >
>> >> > "Carl Mercier" wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> I have an MDI container form (Form1) that has a MenuStrip and a
>> >> >> ToolStrip
>> >> >> embedded in a ToolStripContainer. Form1.MainMenuStrip is set to
>> >> >> MenuStrip1.
>> >> >> The "Content" part has a ToolStripPanel docked to Fill the entire
>> >> >> space.
>> >> >> I
>> >> >> guess this is a pretty normal setup.
>> >> >>
>> >> >> The problem is that all Mdi childs are invisible. They open up
>> >> >> under
>> >> >> the
>> >> >> ToolStripContainer, making them invisible.
>> >> >>
>> >> >> What am I doing wrong? I open the Mdi childs like this:
>> >> >>
>> >> >> Form2 frm = new Form2();
>> >> >> frm.MdiParent = this;
>> >> >> frm.Show();
>> >> >>
>> >> >> Thanks a lot for your help!
>> >> >>
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>>
>>
>>