Writing to a label from a static function
<p>I'm trying to do something that I thought would be easy but can't figure out how to write to a label inside my stating function.</p>

<pre><code>public static void StartProcessing(object data)
{

   lblError.Text = "Blah Blah"
}
</code></pre>

<p>I get the error "An object reference is required for the non-static field, method, or property..."</p>

<p>So I tried creating a new instance of the label and adding it to a new instance of a control (Panel) but the lblError isn't getting displayed</p>

<pre><code>  public static void StartProcessing(object data)
    {
       Panel Panel1 = new Panel();
       Label lblError= new Label();
       Panel1.Controls.Add(lblError);

       lblError.Visible = true;
       lblError.Text = "Blah Blah";

    }
</code></pre>

<p>there must be an easy way to do this? Which i've overlooked..</p>

<p>The function is getting called as follows: If I change the above to not be static I get an error message on the second line below saying the same "An object reference is required for the non-static field, method, or property..." When this function isn't static?</p>

<pre><code>public object LaunchNewProcess(object data)
{
ThreadPool.QueueUserWorkItem(
                new WaitCallback(ProcessStatuses.StartProcessing),
                new object[] {newProcess, allProcesses}
                );
</code></pre>
