Thanks Mano.It works fine.One more thing I want to know.If Iam opening these 2 forms from a third form which is having a menu,how can I solve the same problem
>Hi Resmi,
>
>You could call the MainForm from the childForm by creating a method as shown below in the child form.
>
>private MainForm mainForm;
>public void StoreSender(MainForm form)
>{
> this.mainForm = form;
>}
>
>private void button1_Click(object sender, System.EventArgs e)
>{
> Form2 f = new Form2();
> f.StoreSender((MainForm)this);
> f.Show();
>}
>
>Now you could access the controls on the mainForm in the button_click event as follows:
>
>private void button2_Click(object sender, System.EventArgs e)
>{
> this.mainForm.textBox1.Text=this.textBox2.Text;
>}
>
>
>I have attached a sample which illustrates this completely. Please let me know if this meets your requirements.
>
>Regards,
>Mano
>
>
Test_1.zip
>
Text_passing.zip