窗体load事件中
if(条件成立)
{
this.visible=false;
}
if(this.visible==false)
FrmChile frm =new FrmChild()
frm.MdiParent = mainfrm frm.Show() frm.Activate() Me.Close()