What do you mean disappear? Did you put the panel inside the MdiParent client field?
On Sun, 22 May 2005 09:16:49 +0200, perspolis <rezarms@hotmai l.com> wrote:
[color=blue]
> Hello All
> In a MDI application,I have a panel.but when I show children forms the panel
> disappear.???
>
>
>[/color]
No,I put the panel inside parent form..but when I show childrend forms and
then close them,I can't see the panel??
"Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
news:op.sq5276e mklbvpo@stone.. .[color=blue]
> Hi Persepolis,
>
> What do you mean disappear? Did you put the panel inside the MdiParent[/color]
client field?[color=blue]
>
>
> On Sun, 22 May 2005 09:16:49 +0200, perspolis <rezarms@hotmai l.com> wrote:
>[color=green]
> > Hello All
> > In a MDI application,I have a panel.but when I show children forms the[/color][/color]
panel[color=blue][color=green]
> > disappear.???
> >
> >
> >[/color]
>
>
>
> --
> Happy coding!
> Morten Wennevik [C# MVP][/color]
Not sure if I understand your scenario. You have a panel on an MdiParent, but not in the client area (docked?)
In any case, you probably have something in your code doing something unintended. If you can show us a small but complete code sample demonstrating your problem maybe we can help you.
On Sun, 22 May 2005 11:03:40 +0200, perspolis <rezarms@hotmai l.com> wrote:
[color=blue]
> No,I put the panel inside parent form..but when I show childrend forms and
> then close them,I can't see the panel??
> "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
> news:op.sq5276e mklbvpo@stone.. .[color=green]
>> Hi Persepolis,
>>
>> What do you mean disappear? Did you put the panel inside the MdiParent[/color]
> client field?[color=green]
>>
>>
>> On Sun, 22 May 2005 09:16:49 +0200, perspolis <rezarms@hotmai l.com> wrote:
>>[color=darkred]
>> > Hello All
>> > In a MDI application,I have a panel.but when I show children forms the[/color][/color]
> panel[color=green][color=darkred]
>> > disappear.???
>> >
>> >
>> >[/color]
>>
>>
>>
>> --
>> Happy coding!
>> Morten Wennevik [C# MVP][/color]
>
>
>[/color]
I put a panel in MDI parent..when I want to show a child I have to call this
fragment code to show the child
this.Panel.Send ToBack();
ChildForm ch=new ChildFrom();
ch.MdiParent=th is;
ch.Show();
if I don't call this.Panel.Send ToBack() ,the child is showed under Panel;
when I close the child ,the panel isn't showed anymore.
"Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
news:op.sq6ddlc gklbvpo@stone.. .[color=blue]
> Not sure if I understand your scenario. You have a panel on an MdiParent,[/color]
but not in the client area (docked?)[color=blue]
>
> In any case, you probably have something in your code doing something[/color]
unintended. If you can show us a small but complete code sample
demonstrating your problem maybe we can help you.[color=blue]
>
>
>
> On Sun, 22 May 2005 11:03:40 +0200, perspolis <rezarms@hotmai l.com> wrote:
>[color=green]
> > No,I put the panel inside parent form..but when I show childrend forms[/color][/color]
and[color=blue][color=green]
> > then close them,I can't see the panel??
> > "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
> > news:op.sq5276e mklbvpo@stone.. .[color=darkred]
> >> Hi Persepolis,
> >>
> >> What do you mean disappear? Did you put the panel inside the MdiParent[/color]
> > client field?[color=darkred]
> >>
> >>
> >> On Sun, 22 May 2005 09:16:49 +0200, perspolis <rezarms@hotmai l.com>[/color][/color][/color]
wrote:[color=blue][color=green][color=darkred]
> >>
> >> > Hello All
> >> > In a MDI application,I have a panel.but when I show children forms[/color][/color][/color]
the[color=blue][color=green]
> > panel[color=darkred]
> >> > disappear.???
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> --
> >> Happy coding!
> >> Morten Wennevik [C# MVP][/color]
> >
> >
> >[/color]
>
>
>
> --
> Happy coding!
> Morten Wennevik [C# MVP][/color]
What you need is a way to know when the child is closing. You can use the Child's OnClosing event. Call the parent and if needed have the parent call BringToFront() on the panel
For instance, in your child's closing event call
((Form1)MdiPare nt).ReActivateP anel();
and in your MdiParent ...
public void ReActivate()
{
// if MdiChildren.Len gth == 1, it will be 0 shortly since the
// child calling the method is about to close
if(this.MdiChil dren == null || this.MdiChildre n.Length < 2)
panel1.BringToF ront();
}
On Sun, 22 May 2005 13:52:02 +0200, perspolis <rezarms@hotmai l.com> wrote:
[color=blue]
> I put a panel in MDI parent..when I want to show a child I have to call this
> fragment code to show the child
> this.Panel.Send ToBack();
> ChildForm ch=new ChildFrom();
> ch.MdiParent=th is;
> ch.Show();
> if I don't call this.Panel.Send ToBack() ,the child is showed under Panel;
> when I close the child ,the panel isn't showed anymore.
>
> "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
> news:op.sq6ddlc gklbvpo@stone.. .[color=green]
>> Not sure if I understand your scenario. You have a panel on an MdiParent,[/color]
> but not in the client area (docked?)[color=green]
>>
>> In any case, you probably have something in your code doing something[/color]
> unintended. If you can show us a small but complete code sample
> demonstrating your problem maybe we can help you.[color=green]
>>
>>
>>
>> On Sun, 22 May 2005 11:03:40 +0200, perspolis <rezarms@hotmai l.com> wrote:
>>[color=darkred]
>> > No,I put the panel inside parent form..but when I show childrend forms[/color][/color]
> and[color=green][color=darkred]
>> > then close them,I can't see the panel??
>> > "Morten Wennevik" <MortenWennevik @hotmail.com> wrote in message
>> > news:op.sq5276e mklbvpo@stone.. .
>> >> Hi Persepolis,
>> >>
>> >> What do you mean disappear? Did you put the panel inside the MdiParent
>> > client field?
>> >>
>> >>
>> >> On Sun, 22 May 2005 09:16:49 +0200, perspolis <rezarms@hotmai l.com>[/color][/color]
> wrote:[color=green][color=darkred]
>> >>
>> >> > Hello All
>> >> > In a MDI application,I have a panel.but when I show children forms[/color][/color]
> the[color=green][color=darkred]
>> > panel
>> >> > disappear.???
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >> --
>> >> Happy coding!
>> >> Morten Wennevik [C# MVP]
>> >
>> >
>> >[/color]
>>
>>
>>
>> --
>> Happy coding!
>> Morten Wennevik [C# MVP][/color]
>
>
>[/color]
Comment