title: Thread Control.Invoke
body: <p>I have a function</p>
  
  <pre><code>public void ShowAllFly()
  {  
          cbFly.Items.Clear();
          cbFly.Items.Add("Uçuş Seçiniz...");
  
          dsFlyTableAdapters.tblFlyTableAdapter _t=new KTHY.dsFlyTableAdapters.tblFlyTableAdapter();
          dsFly _mds = new dsFly();
          _mds.EnforceConstraints = false;
          dsFly.tblFlyDataTable _m = _mds.tblFly;
          _t.Fill(_m);
          foreach (DataRow _row in _m.Rows)
          {
              cbFly.Items.Add(_row["FlyID"].ToString()+"-"+_row["FlyName"].ToString() + "-" + _row["FlyDirection"].ToString() + "-" + _row["FlyDateTime"].ToString());
          }
          _Thread.Abort();
          timer1.Enabled = false;
          WaitPanel.Visible = false;
  }
  </code></pre>
  
  <p>In Form_Load Function Like this;</p>
  
  <pre><code>{
      _Thread = new System.Threading.Thread(new System.Threading.ThreadStart(ShowAllFly));
      _Thread.Start();
      _Thread.Priority = System.Threading.ThreadPriority.Normal;
  }
  </code></pre>
  
  <p>But When I run it;</p>
  
  <p>in ShowAllFly function </p>
  
  <pre><code>cbFly.Items.Clear(); ----  HERE Gives ERROR  LIKE  Control.Invoke must be used to interact with controls created on a separate thread.
  </code></pre>
  
  <p>What is the problem?</p>