private void editbtn_Click(object sender, EventArgs e) { if (E == null) { E = new edititem(); E.FormClosed += new FormClosedEventHandler(E_FormClosed); E.Show(); } else { E.Activate(); } }
void E_FormClosed(object sender, FormClosedEventArgs e) { E = null; }