Hi,

i am trying to open mdi child form over mdi parent, but when i open the
child
he open larger then his real size.
what can i do to open it in his real size and in his real position.

Thanks,
Yossi

Re: Mdi child form by Nassos

Nassos
Fri Dec 09 07:26:16 CST 2005

Hello Yossi
in the resize event of the parent put the folowing code:
ChildForm fr = null;

foreach (Form f in this.MdiChildren)

{

if (f.GetType().Name == ChildForm.Name)

{

fr = (ChildForm )f;

break;

}

}

if (fr!=null)

{

fr.Top = 0;

fr.Left = 0;

fr.Width = this.ClientSize.Width - 5;

fr.Height = this.ClientSize.Height - 55;

}

Hope that helps you!!



"Yossi And Inbar" <inbarlaw@bezeqint.net> wrote in message
news:O2RsF%23I$FHA.360@TK2MSFTNGP09.phx.gbl...
> Hi,
>
> i am trying to open mdi child form over mdi parent, but when i open the
> child
> he open larger then his real size.
> what can i do to open it in his real size and in his real position.
>
> Thanks,
> Yossi
>



Re: Mdi child form by Yossi

Yossi
Fri Dec 09 09:54:35 CST 2005

Hi Nassos,

First of all Thanks, but its not the situation.
My form is at the same size that i want after your fix code , but all the
controlls in the child Form are largest from my design form.
In the parent form i see a child form with largest controls (controls of the
child).
Thanks,
Yossi

"Nassos" <nasos@orama-tech.gr> wrote in message
news:e$BIlPM$FHA.2308@TK2MSFTNGP10.phx.gbl...
> Hello Yossi
> in the resize event of the parent put the folowing code:
> ChildForm fr = null;
>
> foreach (Form f in this.MdiChildren)
>
> {
>
> if (f.GetType().Name == ChildForm.Name)
>
> {
>
> fr = (ChildForm )f;
>
> break;
>
> }
>
> }
>
> if (fr!=null)
>
> {
>
> fr.Top = 0;
>
> fr.Left = 0;
>
> fr.Width = this.ClientSize.Width - 5;
>
> fr.Height = this.ClientSize.Height - 55;
>
> }
>
> Hope that helps you!!
>
>
>
> "Yossi And Inbar" <inbarlaw@bezeqint.net> wrote in message
> news:O2RsF%23I$FHA.360@TK2MSFTNGP09.phx.gbl...
>> Hi,
>>
>> i am trying to open mdi child form over mdi parent, but when i open the
>> child
>> he open larger then his real size.
>> what can i do to open it in his real size and in his real position.
>>
>> Thanks,
>> Yossi
>>
>
>