private void infoBtn_Click(object sender, EventArgs e) { //create an object for the infoForm infoForm info = new infoForm(); //create a form closed event to dispose of the infoForm form correctly info.FormClosed += new FormClosedEventHandler(info_FormClosed); this.Hide(); info.Show(); }
private void info_FormClosed(object sender, FormClosedEventArgs e) { infoForm info = new infoForm(); info.Dispose(); this.Show(); }