Hi PraveenRockz,
You can expose some properties in the Form1, so you can use these properties to change the field inside the Form1. Then you need you add a reference to Form1 in Form2. Try something like the following:
The code for Form1
Code Block
public partial class Form1 : Form
public Form1()
public string MyText
set { this.textBox1.Text = value; }
private void button1_Click(object sender, EventArgs e)
Form2 f = new Form2(this);
this);
The code for Form2
Code Block
public partial class Form2 : Form
public Form2(Form1 f)
Form1 internalform;
private void btnSubmit_Click(object sender, EventArgs e)
if (internalform != null)
this.textBox1.Text;
this.Close();
Hope this helps. Best regards. Rong-Chun Zhang |