private void validateUserEntry() { // Checks the value of the text. // Initializes the variables to pass to the MessageBox.Show method. string message = "Ти деган, ти ніхуя не ввів, введеш ще раз?"; string caption = "Пізда"; MessageBoxButtons buttons = MessageBoxButtons.YesNo; DialogResult result; // Displays the MessageBox. result = MessageBox.Show(message, caption, buttons); if (result == System.Windows.Forms.DialogResult.Yes) { // Closes the parent form. this.Close(); Form8 newform = new Form8(); newform.Show(); } else { this.Close(); } }
private void button7_Click(object sender, EventArgs e) { Form8 newform = new Form8(); newform.Show(); }