private void toolStripButton1_Click(object sender, EventArgs e) { foreach (Form child in MdiChildren) { if (child.GetType() == typeof(Form2)) //这个是激活窗体的名称 { child.Activate(); return; } } Form2 frm2 = new Form2(); frm2.MdiParent = this; frm2.Dock = DockStyle.None; frm2.Show(); }