private void ShowOptionsForm()
{
dynamic options = new frmOptions();
// Did the user click Save?
if (options.ShowDialog() == Windows.Forms.DialogResult.OK) {
// Yes, so grab the values you want from the dialog here
string textBoxValue = options.txtMyTextValue.Text;
}
}
Code (C#)
public class frmOptions
{
private void btnSave_Click(object sender, EventArgs e)
{
// Set the result to pass back to the form that called this dialog
this.DialogResult = Windows.Forms.DialogResult.OK;
}
}