private void deletebtn_Click(object sender, EventArgs e) { if (D == null) { D = new deleteitem(); D.FormClosed += new FormClosedEventHandler(D_FormClosed); D.Show(); } else { D.Activate(); } }
void D_FormClosed(object sender, FormClosedEventArgs e) { D = null; }