1.I Have one form with a textbox
2.In keyDown event While pressing F1 an another form opens.
3.In the second form,i have a richtextbox.I want to edit tat richtextbox and pass that value to form1's textbox while clicking a button in form2.
private void Export_Load(object sender, EventArgs e)
textBox1.Text = "hai hello welcome to chennai";
}private void textBox1_KeyDown(object sender, KeyEventArgs e)
if (e.KeyCode ==Keys.F1)
rchbox rch = new rchbox();
rch.richTextBox1.Text = textBox1.Text;
Export ex = new Export();
Class1 c = new Class1();
private void button1_Click(object sender, EventArgs e)
c.txt = richTextBox1.Text;
ex.textBox1.Text = richTextBox1.Text;
I have found the problem that the form1 is not refreshed.i have even tried by calling refresh method. Can any one tell me.
I have different soln with out refresh
1-u declare static variable in form1 and store the value u want.
2-in form2,call form1.variable and use it as u like
why dont you try using delegates to work this out. ?