private void menuButton_Click(object sender, EventArgs e) { Form f = this.FindForm(); MenuScreen ms = new MenuScreen(); f.Controls.Remove(this); f.Controls.Add(ms); ms.Focus(); }
private void exitButton_Click(object sender, EventArgs e) { storeScore(); #region change screen Form f = this.FindForm(); f.Controls.Remove(this); MenuScreen ms = new MenuScreen(); f.Controls.Add(ms); ms.Location = new Point((f.Width - ms.Width) / 2, (f.Height - ms.Height) / 2); ms.Focus(); #endregion }