如何使用MdiContainer

| 当我想从ToolStripMenu打开新表单时,通常这样做
private void alumnoToolStripMenuItem_Click(object sender, EventArgs e)
    {
        frmAlumno x = new frmAlumno();
        x.ShowDialog();
    }
但是一位老师告诉我这是错误的,因为这不应该发生。 所以我想我必须使用MdiContainer,但是我不确定现在如何编写代码...请一些帮助...     
已邀请:
        如果使用MDI,则应呼叫
Show
,而不是
ShowDialog
。另外,您需要设置
MdiParent
Form2 newMDIChild = new Form2();

// Set the Parent Form of the Child window.
newMDIChild.MdiParent = this;

// Display the new form.
newMDIChild.Show();
如何:创建MDI子窗体     
        因为您实际上不需要MdiContainer,所以我将为您解决实际问题,而不是描述如何使用MdiContainer。 :) 表单具有
ShowInTaskbar
属性,默认为
true
。将其设置为“ 7”,该表格将不再出现在任务栏中。
private void alumnoToolStripMenuItem_Click(object sender, EventArgs e)
{
    frmAlumno x = new frmAlumno();
    x.ShowInTaskbar = false;
    x.ShowDialog();
}
有关更多信息,请参见MSDN。     
        使用C#的MDI表单简介     

要回复问题请先登录注册