[求助]怎么得到前一个form的TextBox的值啊
怎么得到前一个form的TextBox的值啊
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 form2 = new Form2(textBox1.Text);
form2.Show();
}
}
----------------------------------------------------------------------
public partial class Form2 : Form
{
string text;
public Form2(string text)
{
this.text = text;
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
label1.Text = text;
}
}