private void modifyYearGroupsToolStripMenuItem_Click(object sender, EventArgs e) { if (yearView == null) { yearView = new Years(); yearView.TT = currentTT; } this.Enabled = false; //focus on weekView form. Wait for a response. yearView.ShowDialog(); this.Enabled = true; yearView = null; //clears the value from the heap }