private
void
Form1_Load(
object
sender, EventArgs e)
{
frm=
new
Form2();
frm.TopLevel =
false
;
frm.Show();
this
.panel1.Controls.Add(frm);
this
.panel1.Resize+=
new
EventHandler(panel1_Resize);
}
Form2 frm;
private
void
panel1_Resize(
object
sender, EventArgs e)
{
if
(frm !=
null
)
{
frm.Size =
this
.panel1.Size;
}
}
https://bbs.csdn.net/topics/310148741