private void btnpkm_Click(object sender, EventArgs e) { UserWindows.pkm gdc = new UserWindows.pkm(); gdc.Owner = this; gdc.ShowDialog(); if (gdc.DialogResult == DialogResult.OK) { MainForm frm1 = (MainForm)this.Owner; frm1.ChooseParaID = ChooseID; frm1.Pic = pic; this.DialogResult = DialogResult.OK; } }