C#关闭子窗体更新父窗体(一)

父窗体

private void simpleButton1_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2();
            f2.Owner = this;
            DialogResult result=f2.ShowDialog();
            if (result == DialogResult.Cancel)
            {
                this.gridControl1.DataSource = f2.CreateTable();
            }
        }

子窗体

private void simpleButton1_Click(object sender, EventArgs e)
       {
           this.Close();
       }

http://www.cnblogs.com/zq281660880/archive/2012/10/14/2723232.html

展开阅读全文

没有更多推荐了,返回首页