I'm assuming you have a form called SelectPlane, and on this form, you have some button that calls this.Close() to close the form. In the handler, simply set this.DialogResult = DialogResult.OK before closing, and that will be returned from ShowDialog().
public partial class ShowPlane : Form
{
// everything else
private void OKButton_Click(object sender, EventArgs e)
{
this.DialogResult = DialogResult.OK;
this.Close();
}
}
David Morton -
http://blog.davemorton.net/ -
@davidmmorton -
ForumsBrowser, a WPF Forums Client