MDI Form detecting with a child form is added or removed

前端 未结 8 801
心在旅途
心在旅途 2020-12-21 08:11

Is there an event I can use to tell if a child form has been added or removed from the MDI parent?

8条回答
  •  醉酒成梦
    2020-12-21 08:28

    private void closeToolStripMenuItem1_Click(object sender, EventArgs e)
        {
          List
    fm = this.MdiChildren.ToList(); if(fm!=null && fm.Count>0) { foreach(Form lfm in fm) { lfm.Close(); } } }

提交回复
热议问题