btnOK_Click ( object sender, System.EventArgs e ) { if ( DoDataExchange(true) ) { this.DialogResult = DialogResult.OK; this.Close(); } }