private void but_yes_Click(object sender, EventArgs e) { result = DialogResult.Yes; msgbox.Close(); }