P
PeterB
Hello!
Using C# on WM2003SE. I have a parent form which opens a child form with
ShowDialog(). When exiting the child form I usually just set DialogResult to
a value and execution is transferred to the parent again.
If I am doing some checking in the constructor or load event of the child
form, and the result of this check is that I need to go back to the parent
form, it's not enough to just set the DialogResult. Instead I have to
explicitly call this.Close() in the constructor or load event (and ofcourse
set the DialogResult to an appropriate value).
Could someone explain why this is so?
Thanks,
Peter
Using C# on WM2003SE. I have a parent form which opens a child form with
ShowDialog(). When exiting the child form I usually just set DialogResult to
a value and execution is transferred to the parent again.
If I am doing some checking in the constructor or load event of the child
form, and the result of this check is that I need to go back to the parent
form, it's not enough to just set the DialogResult. Instead I have to
explicitly call this.Close() in the constructor or load event (and ofcourse
set the DialogResult to an appropriate value).
Could someone explain why this is so?
Thanks,
Peter