Modifying a form object created by application.run(form1)
<p>I'm new to C# and trying to figure out how to edit a form from another class. The form is created by the default VS approach, as so:</p>

<pre><code>static void Main()
{
  Application.EnableVisualStyles();
  Application.SetCompatibleTextRenderingDefault(false);
  Application.Run(new Form1());
}
</code></pre>

<p>I've created a method in the Form1.cs file, just as a test for how to update a label1 field that is in Form1. Here is the method:</p>

<pre><code>public void UpdateLabel(string state = "Changed Text")
{
  label1.Text = state;
}
</code></pre>

<p>The problem I'm having is that the Application.Run command doesn't provide for a named object of type Form1. So when I want to trigger the UpdateLabel method from Program.cs, like so:</p>

<pre><code>XXX.UpdateLabel();
</code></pre>

<p>I don't have an object to target to access the form. If I were creating the form manually, then I believe this would work fine:</p>

<pre><code>Form1 myForm = new Form1();
myForm.UpdateLabel();
</code></pre>

<p>With the Application.Run(Form1) that the Windows Form Application provides, how do I access the form object that is being created? Also, is this the approach I should be taking for this type of problem, or is there a better method?</p>
