商务合作:179001057@qq.com

form2到form7的数据单向传输

技术2022-05-11  0


某平台价值19860元的编程课程资料免费领取【点我领取】


 

form2的botton写法: 

private void read_Click(object sender, EventArgs e)        {            Form7 formChild = new Form7(this.textBox1Frm2.Text,this.textBox2Frm2.Text,this.textBox3Frm2.Text,this.textBox4Frm2.Text);            formChild.ShowDialog();

        }

 

form7写法:

    public partial class Form7 : Form    {        public Form7(string text,string text2,string text3,string text4)        {            InitializeComponent();            this.textBox1Frm7.Text = text;            this.textBox2Frm7.Text = text2;            this.textBox3Frm7.Text = text3;            this.textBox4Frm7.Text = text4;        }

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

    }


最新回复(0)