title: Set simple timeout
body: <p>I've checked the other questions in SO for timeout in C#, but since I'm a beginner, I don't really know how to implement them into my code. They look too sophisticated.</p>
  
  <p>I have a text box and I added a click event. Upon click, user copies the content of the text box to the clipboard. To make the copy process noticeable to the user, I change the back color of the text box. <strike>Once the content is copied</strike>, I want to change the back color of the text box back to normal. So I need to set a timeout.</p>
  
  <pre><code>private void IDBox_Click(object sender, EventArgs e)
  {
      CopyToClipboard((TextBox)sender);
  }
  
  private void CopyToClipboard(TextBox textBox)
  {
      if (textBox.Text != "")
      {
          textBox.BackColor = System.Drawing.Color.MistyRose;
  
          Clipboard.SetText(textBox.Text);
  
          // set 200ms timeout and then change BackColor
          //textBox.BackColor = System.Drawing.SystemColors.Window;
      }
  }
  </code></pre>
  
  <p>How can I set a timeout? An example would be great.</p>