In my cf.net project, I have a main "parent" form that will sometimes display a child-form like so:
Subform A = new SubForm();
A.ShowDialog();
//Get a property from the SubForm and use it.
In my subform contains some linkLabels. The linkLabel's click event does something and sets the dialogresult like this:
this.TextProperty = SomeNeatValue;
this.DialogResult = DialogResult.OK;
//This subform disappears and code resumes on the main form.
My main form also has a MouseUp() handler that does something whenever a control isn't clicked. But the main form's MouseUp() handler is being called after the linkLabel in the SubForm is clicked and the SubForm is dismissed!
I want the SubForm's linkLabel to totally consume the click and for the main form not to get it, but I can't find any way to prevent this. Can anyone help me?