473,403 Members | 2,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

helppppppppppppppppppppppppppppppppppp

Hello All
In a MDI application,I have a panel.but when I show children forms the panel
disappear.???
Nov 17 '05 #1
5 1055
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 <re*****@hotmail.com> wrote:
Hello All
In a MDI application,I have a panel.but when I show children forms the panel
disappear.???


--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #2
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" <Mo************@hotmail.com> wrote in message
news:op.sq5276emklbvpo@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 <re*****@hotmail.com> wrote:
Hello All
In a MDI application,I have a panel.but when I show children forms the panel disappear.???


--
Happy coding!
Morten Wennevik [C# MVP]

Nov 17 '05 #3
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 <re*****@hotmail.com> wrote:
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" <Mo************@hotmail.com> wrote in message
news:op.sq5276emklbvpo@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 <re*****@hotmail.com> wrote:
> Hello All
> In a MDI application,I have a panel.but when I show children forms the panel > disappear.???
>
>
>


--
Happy coding!
Morten Wennevik [C# MVP]



--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #4
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.SendToBack();
ChildForm ch=new ChildFrom();
ch.MdiParent=this;
ch.Show();
if I don't call this.Panel.SendToBack() ,the child is showed under Panel;
when I close the child ,the panel isn't showed anymore.

"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:op.sq6ddlcgklbvpo@stone...
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 <re*****@hotmail.com> wrote:
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" <Mo************@hotmail.com> wrote in message
news:op.sq5276emklbvpo@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 <re*****@hotmail.com> wrote:
> Hello All
> In a MDI application,I have a panel.but when I show children forms
the panel
> disappear.???
>
>
>

--
Happy coding!
Morten Wennevik [C# MVP]



--
Happy coding!
Morten Wennevik [C# MVP]

Nov 17 '05 #5
Ah, now I get you.

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)MdiParent).ReActivatePanel();

and in your MdiParent ...

public void ReActivate()
{
// if MdiChildren.Length == 1, it will be 0 shortly since the
// child calling the method is about to close
if(this.MdiChildren == null || this.MdiChildren.Length < 2)
panel1.BringToFront();
}
On Sun, 22 May 2005 13:52:02 +0200, perspolis <re*****@hotmail.com> wrote:
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.SendToBack();
ChildForm ch=new ChildFrom();
ch.MdiParent=this;
ch.Show();
if I don't call this.Panel.SendToBack() ,the child is showed under Panel;
when I close the child ,the panel isn't showed anymore.

"Morten Wennevik" <Mo************@hotmail.com> wrote in message
news:op.sq6ddlcgklbvpo@stone...
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 <re*****@hotmail.com> wrote:
> 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" <Mo************@hotmail.com> wrote in message
> news:op.sq5276emklbvpo@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 <re*****@hotmail.com> wrote: >>
>> > Hello All
>> > In a MDI application,I have a panel.but when I show children forms the > panel
>> > disappear.???
>> >
>> >
>> >
>>
>>
>>
>> --
>> Happy coding!
>> Morten Wennevik [C# MVP]
>
>
>


--
Happy coding!
Morten Wennevik [C# MVP]



--
Happy coding!
Morten Wennevik [C# MVP]
Nov 17 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.