Set the form’s DialogResult:
this.DialogResult = DialogResult.OK;
this.Close();
This would cause any opener that opened this form with ShowDialog() to get the given DialogResult as the result.
Set the form’s DialogResult:
this.DialogResult = DialogResult.OK;
this.Close();
This would cause any opener that opened this form with ShowDialog() to get the given DialogResult as the result.