예제 #1
0
        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();
        }
예제 #2
0
        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
        }