title: Getting increasingly slow to write into textbox using textBox_TextChanged event and if statement together.
body: <p>I am making a dictionary using C# and Windows forms. In my dictionary I have a <code>textBox</code> where the user can search for a word to get the meaning. I also have some options in a <code>comboBox</code> where the user can choose a language to see the meaning for that language. Because I am making the dictionary for different languages.</p>
  
  <p>My code looks like:</p>
  
  <pre><code>private void textBox1_TextChanged(object sender, EventArgs e)
  {
      string word = textBox1.Text;
  
      SqlCeConnection con = new SqlCeConnection(@"Data Source=" + Directory.GetCurrentDirectory() + @"\Database\condrokothadb.sdf;Password=000;");
  
      //in combobox there are 2 option(language)
      //if select one language(option) from combobox
      if(mood=="bangla") 
      {
          SqlCeDataAdapter b = new SqlCeDataAdapter("SELECT english,bangla FROM dic WHERE (bangla like '" + word + "%')", con);
          DataTable tt = new DataTable();
          b.Fill(tt);
          dataGridView1.DataSource = tt;
      }
      else   //by default english language is selected 
      {
          using (con)
          {
              con.Open();              
              using (SqlCeDataAdapter b = new SqlCeDataAdapter("SELECT english,bangla FROM dic WHERE (english like '" + word + "%')", con))
              {
                  DataTable tt = new DataTable();
                  b.Fill(tt);
                  dataGridView1.DataSource = tt;
              }
          }
      }
  }
  
  private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
  {
      if (((ComboBox)sender).SelectedItem.ToString() == "Bangla")
      {
          mood = "bangla";
      }
      else if (((ComboBox)sender).SelectedItem.ToString() == "English")
      {
          mood = "english";
      }
  }
  </code></pre>
  
  <p>My problem is that when a user want to write something into the textbox it is getting so much slower to write. How can I overcome that?</p>