---------------------------------------
//write this code in form1
private void btnPassValue_Click(object sender, EventArgs e)
{
frmSecondForm myForm2 = new frmSecondForm();
myForm2.form1TextBoxValue = this.txtPassValue.Text;
myForm2.Show();
}
------------------------------------------
//write this code in form 2
//form level
private string tempvalue;
public string form1TextBoxValue
{
get
{
return tempvalue;
}
set
{
tempvalue = value;
}
}
private void frmSecondForm_Load(object sender, EventArgs e)
{
this.txtReceiveValue.Text = tempvalue;
}
------------------------------------------
***end of program***
Cheap Quad-Core Android Tablets under Php 4,000
9 years ago
No comments:
Post a Comment