private void btnWholeseler_Click(object sender, EventArgs e) { if (wh == null) { wh = new Wholesaler(); wh.MdiParent = this; wh.FormClosed += new FormClosedEventHandler(wh_FormClosed); wh.Show(); } else { wh.Activate(); } }
void wh_FormClosed(object sender, FormClosedEventArgs e) { wh = null; }