You have to use an
instance of
Form1
to access its
textBox1
control.
The way you wrote it, is like you are expecting the textbox to be a static element of the
Form1
class, which it obviously is not.
One way to do that is to keep a reference to the instance at the time you create it (most probably, in the
Main
method of the
Program
class):
static void Main(string[] args) {
Form1 form = new Form1();
form.textBox1.Text = "Whatever...";
Application.Run(form);
}
PS: I just saw you have reposted your question instead of editing already existing one. Please do not repost the same question several times; it will not help you getting better answers.