Exemplo n.º 1
0
        private void splashTimer_Tick(object sender, EventArgs e)
        {
            splashTimer.Enabled = false;
            StartForm startForm = new StartForm();

            startForm.Show();
            this.Hide();
        }
Exemplo n.º 2
0
        private void backButton_Click(object sender, EventArgs e)
        {
            // hide the next form
            this.Hide();
            // instinate a start form
            StartForm startForm = new StartForm();

            // show the start form
            startForm.ShowDialog();
            // close the next form
            this.Close();
        }
Exemplo n.º 3
0
        private void NextForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            DialogResult dialogResult = MessageBox.Show("Do you want to exit the next form?", "Exit", MessageBoxButtons.YesNo);

            if (dialogResult == DialogResult.Yes)
            {
                e.Cancel = false;
                // hide the next form
                this.Hide();
                // instinate a start form
                StartForm startForm = new StartForm();
                // show the start form
                startForm.ShowDialog();
                // close the next form
                this.Close();
            }
            else if (dialogResult == DialogResult.No)
            {
                e.Cancel = true;
            }
        }