My code work...problem is ...
Form 1 button click open Form2 and find value, when return value open new form not existing? Some help
I think it is problem line 11..12...
-
- public partial class Form1 : Form
- {
- Form2 f2;
- public Form1()
- {
- InitializeComponent();
- }
- private void button1_Click(object sender, EventArgs e)
- {
- if (f2 == null)
- f2 = new Form2();
- f2.ValueFromForm1(textBox1.Text);
- f2.Show();
- }
- }
-
- public partial class Form2 : Form
- {
- public Form2()
- {
- InitializeComponent();
- }
- public void ValueFromForm1(string value)
- {
- textBox1.Text = value;
- }
- }