父窗口的定义
namespace Test
{
  public delegate void ChildClose();
  public partial class Parent : Form
  {
    private void btnLogIn_Click(object sender, EventArgs e)
    {
       Chield ch = new Chield();
       ch.closeFather += new ChildClose(this.Close);
       ch.Show();
       this.Visible = false;
    }
  }
}
namespace Test
{
  public partial class Chield : Form
  {
    public event ChildClose closeFather;
    public Chield ()
    {
      InitializeComponent();
    }
    private void Chield_FormClosed(object sender, FormClosedEventArgs e)
    {
      closeFather();
    }
  }
}
                    
                


  
                
            
        
浙公网安备 33010602011771号