Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
1.44/5 (2 votes)
See more:
form1.....>> 1.text box1
2.expand button.....>click event ...>>open form2
form2........>
1.textbox2
2.ok button.......> click event .........>send textbox2.text on textbox1 and form2 close ...........but there problem is that when we click ok button data send on form1 but form1 not reload ..... form1 open double.......
Posted
Comments
syed shanu 2-Sep-13 3:51am    
Can you paste your code here .its good to paste both the codes
2.expand button.....>click event ...>>open form2
2.ok button.......> click event .........>send textbox2.text on textbox1 and form2 close ...........
Member 10227602 2-Sep-13 3:53am    
ok i can paste
Member 10227602 2-Sep-13 3:55am    
i use its code in long project ..so to create it in other small project thann i send u
Member 10227602 2-Sep-13 4:06am    
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
textBox1.Text = Class1.mystring;
}

private void button1_Click(object sender, EventArgs e)
{
Form2 f2 = new Form2();
f2.Show();


}
}
public partial class Form2 : Form
{
public Form2()
{
InitializeComponent();
}

private void button2_Click(object sender, EventArgs e)
{
Form1 f1 = new Form1();
f1.mdiparent=this;
this.Close();
f1.Show();
Class1.mystring = textBox2.Text;
}
Mehdi Gholam 2-Sep-13 3:52am    
Your question makes little sense.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900