Exemple #1
0
        private void MainButton_Click(object sender, EventArgs e)
        {
            Form f = this.FindForm();

            f.Controls.Remove(this);

            MainScreen ms = new MainScreen();

            f.Controls.Add(ms);

            ms.Location = new Point((f.Width - ms.Width) / 2, (f.Height - ms.Height) / 2);
            ms.Focus();
        }
Exemple #2
0
        public void mainScreen()
        {
            Form f = this.FindForm();

            f.Controls.Remove(this);

            MainScreen ms = new MainScreen();

            f.Controls.Add(ms);

            ms.Location = new Point((f.Width - ms.Width) / 2, (f.Height - ms.Height) / 2);
            ms.Focus();
        }