Form2代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Form2 : Form { public delegate void returnValue(string text); public returnValue ReturnValue; public Form2() { InitializeComponent(); } public Form2(string text) : this() { textBox1.Text = text; } private void Form2_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { if (ReturnValue != null) { ReturnValue(textBox1.Text); } Close(); } } } 第eight天 22:05:26 Form1代码: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; namespace WindowsApplication1 { public partial class Form1 : Form { private void GetReturnValue(string text) { textBox1.Text = text; } public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Form2 frm = new Form2(textBox1.Text); frm.ReturnValue = GetReturnValue; frm.Show(); }