📜  c# 上层对象不能添加到对象 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:55.010000             🧑  作者: Mango

代码示例1
private void frmInitialEntryBooks_Load(object sender, EventArgs e)
{
    frmSujbect objForm = new frmSujbect();
    objForm.TopLevel = false;
    pnl.Controls.Add(objForm);
    objForm.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None;
    objForm.Dock = DockStyle.Fill;
    objForm.Show();
}