title: C# Threads - Parent Access Problem
body: <p>my aim is that in the function "Dummy" i can change the controls like labels etc of the  form from which the thread is initiating..how to do it..please don't suggest completely different strategies or making a worker class etc...modify this if you can</p>
  
  <pre><code>        Thread pt= new Thread(new ParameterizedThreadStart(Dummy2));
  
  
          private void button1_Click(object sender, EventArgs e)
          {                    
              pt = new Thread(new ParameterizedThreadStart(Dummy2));
              pt.IsBackground = true;
              pt.Start( this );
          }
  
  
          public static void Dummy(........)
          {
             /*                
             what i want to do here is to access the controls on my form form where the
             tread was initiated and change them directly
             */ 
          }
  
          private void button2_Click(object sender, EventArgs e)
          {
              if (t.IsAlive)
                  label1.Text = "Running";
              else
                  label1.Text = "Dead";
          }
  
          private void button3_Click(object sender, EventArgs e)
          {
              pt.Abort();
          }
  
  
      }
  }
  </code></pre>
  
  <p>what i plan is that i could do this in the "Dummy" function</p>
  
  <pre><code>Dummy( object p)
  {
    p.label1.Text = " New Text " ;
  }
  </code></pre>