主窗体:
Code
frmConfigIni frmconfigini = new frmConfigIni();
frmconfigini.Show();
if (frmconfigini.DialogResult == DialogResult.OK)
{
MessageBox.Show("子窗体的OK被点击了");
}
frmConfigIni frmconfigini = new frmConfigIni();
frmconfigini.Show();
if (frmconfigini.DialogResult == DialogResult.OK)
{
MessageBox.Show("子窗体的OK被点击了");
}
子窗体:
Code
this.DialogResult=DialogResult.OK;
this.DialogResult=DialogResult.OK;