日期:2014-05-18 浏览次数:20908 次
//也可以这样
//Form1:
        private static string texts;
        public static string Texts
        {
            get{return texts;}
        }
        private void button1_Click(object sender, System.EventArgs e)
        {
//            string text=this.textBox1.Text;
//            Form2 f2=new Form2(text);
            texts=this.textBox1.Text;
            Form2 f2=new Form2();
            f2.ShowDialog();
        }
//Form2:
        private void Form2_Load(object sender, System.EventArgs e)
        {
            this.textBox2.Text=Form1.Texts;
        }