public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.StrValue = this.textBox1.Text;
f2.Show();
}
}
public partial class Form2 : Form
{
private string strValue;
public string StrValue
{
get { return strValue; }
set { strValue = value; }
}
public Form2()
{
InitializeComponent();
}
private void Form2_Load(object sender, EventArgs e)
{
this.textBox2.Text = strValue;
}
}