Your MDI child cannot be a dialog, the DialogResult property thus doesn't apply. Raising an event is otherwise not a problem. For example: public partial class EditChildForm : Form { public event EventHandler ApplyChanges; public EditChildForm() { InitializeComponent(); } private void btnClose_Click(object sender, EventArgs e) { if (ApplyChanges != null) ApplyChanges(this, EventArgs.Empty); this.Close(); } } Usable from the MDI parent like this: private void btnOpenEditor_Click(object sender, EventArgs e) { EditChildForm frm = new EditChildForm(); frm.ApplyChanges += new EventHandler(frm_ApplyChanges); frm.MdiParent = this; frm.Show(); } void frm_ApplyChanges(object sender, EventArgs e) { EditChildForm frm = sender as EditChildForm; // Do something... }
Hans Passant.- Unmarked As Answer byLeonardoIndex Tuesday, September 15, 2009 2:17 PM
- Marked As Answer byLeonardoIndex Tuesday, September 15, 2009 1:39 PM
-
|