Hello, I have one main form with a text box that needs to be filled by a parameter from a second form (which opens on a button click in form1). Right now I have something that looks like this:
//in form1
private void button1_Click(Object sender, EventArgs e) {
form2 f2 = new form2();
f2.Show();
//looks like I need some kind of system pause here...I tried a system pause and a Console.ReadLine, to no avail
textBox1.Text = f2.param.ToString();
}
The problem is that f2.param fills the textBox right away, before it can be retrieved from the user on form2. If its not obvious, I'm a little new to C#.
Thanks for the help.
//in form1
private void button1_Click(Object sender, EventArgs e) {
form2 f2 = new form2();
f2.Show();
//looks like I need some kind of system pause here...I tried a system pause and a Console.ReadLine, to no avail
textBox1.Text = f2.param.ToString();
}
The problem is that f2.param fills the textBox right away, before it can be retrieved from the user on form2. If its not obvious, I'm a little new to C#.
Thanks for the help.