在Form1中公开一个属性
public string RiText
{
get { return richTextBox1.Text; }
set { richTextBox1.Text = value; }
}
然后设置和返回Form1中richTextBox1的值
在From1中当点击button1时候传入this关键字
Form2 f2 = new Form2();
f2.Show(this);
最后在Form2的button1的单击事件中获取传入的Form1,然后传入form1的richTextBox1
Form1 f1 = (Form1)this.Owner;
f1.RiText = richTextBox1.Text;
this.Close();