private void splashTimer_Tick(object sender, EventArgs e) { splashTimer.Enabled = false; StartForm startForm = new StartForm(); startForm.Show(); this.Hide(); }
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(); }
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; } }