-2

Exactly what the title says I don't know how to transfer text from Form1 to form2...

I have tried multiple methods which have failed.

Please help and thank you

1 Answers1

0

You can pass it using Form2 constructor function. In Form1:

Form2 form2 = new Form2(this.textBox1.Text);

form2.ShowDialog();

In Form2:

public class Form2
{
    public Form2(string comingText)
    {
        InitializeComponents();

        this.textBox3.Text = comingText;
    }
}
Mustafa Chelik
  • 2,113
  • 2
  • 17
  • 29