In case of Windows application, Either you can use Properties or Use parameterised constructor to do the same.
Using Parameterised Constructor
---------------------
Write the following code on button click event of Form1
Form5 f=new Form5(textBox1.Text);
f.Show();
Get the value in the Form5 as
string sValue;
public Form5(string s)
{
sValue=s;
}
Using Properties
-------------------
Define the property in Form2 as
private string sValue;
public string Value
{
get{return value;}
set{value=sValue;}
}
and use the value of the variable as well.
Setting the value of textBox1 in Form1 as:
Form2 f=new Form2();
f.Value=textBox1.Text;