I've been trying to change the text of a textbox in Form1 by clicking a button (button1 in form2 is "STARTA") in Form2 and probably spent a good 2 hours now (I'm a programming-newbie!). I have been searching around for similiar questions and found a bunch, but even after trying a lot of them I can't get it to work.
Form1[DESIGN]
Form2[DESIGN]
The method I'm trying right now is something I found here
In Form1 I wrote this:
public string STARTTID
{
get
{
return this.textBox3.Text;
}
set
{
this.textBox3.Text = value;
}
}
I know it doesn't quite make sense to get and set an empty textBox, but I've tried so many different solutions which I think should work, but the textBox's text just wont change when I click the button! In form2, when button1 is clicked, I wrote this:
string TIDEN = DateTime.Now.ToString("HH:mm:ss tt");
Form1 first = new Form1();
first.STARTTID = TIDEN;
What I'm trying to do, is that I want the text in textBox3 in form1 to change to the current time when button1 in form2 is pressed.
Sorry if this post is a bit messy, it's my first and english isn't my strongest language.