WinterMuteUK
asked on
How to inform one form that another has ended...
I have 2 forms:
form1, form2.
form1 creates a new instance of form2 in the standard way, I want form1 to perform a method when form2 closes, but how do I inform form1 that this has occured and to go ahead and start the method?
form1, form2.
form1 creates a new instance of form2 in the standard way, I want form1 to perform a method when form2 closes, but how do I inform form1 that this has occured and to go ahead and start the method?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Right,
Found it, if I set the DialogResult property of the buttons on the form!
Thanks for the help
Me.
Found it, if I set the DialogResult property of the buttons on the form!
Thanks for the help
Me.
ASKER
Currently I have it set up:
01. if (dlg.ShowDialog() == DialogResult.OK )
02. {
03. MessageBox.Show("Got Here (1)");
04. }
05. MessageBox.Show("Got Here (2)");
And if I place a break point on line 03 the code shows the form, and when I close the form (using this.Close();) it just skips to line 05.
Thanks again.
Me.