-1
Hi, I would like to know how I make the open form inside a Panel to follow the Panel if I resize the main form.
Form2 frm = new Form2();
frm.TopLevel = false;
frm.Size = panel1.Size;
panel1.Controls.Add(frm);
frm.Show();
I am using the code above to open Form2 inside the Form1 panel and when resizing Frm1 the Form2 continue n the same size.
puts the form2 to open maximized
– Rovann Linhalis
Form2 is about to open maximized, the problem is that Form2 is not following the Panel, if I change the size of the Form1 the Panel accompanies due to the Anchor of the Panel, only the Form2 remains static even the Panel accompanying the Form1.
– Danillo Dars
remove the edges of the form2,
BorderStyle = None
... and put to open maximized.. is not, if it were the maximize box would not be appearing but to restore– Rovann Linhalis
Sorry, I put to maximize and still does not follow.
– Danillo Dars
I changed the photos of the post.
– Danillo Dars
There is no way to pass the panel size to Form2?
– Danillo Dars