Mdi child form

  • Thread starter Yossi And Inbar
  • Start date
Y

Yossi And Inbar

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
 
N

Nassos

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!!
 
Y

Yossi And Inbar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top