コード例 #1
0
        private void playAgainButton_Click(object sender, EventArgs e)
        {
            MainScreen ms = new MainScreen();
            Form       y  = this.FindForm();

            y.Controls.Remove(this);
            y.Controls.Add(ms);
            ms.Focus();
            //takes you back to main menu
        }
コード例 #2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            MainScreen ms = new MainScreen();

            this.Controls.Add(ms);
        }