title: How can I display a loading control while a process is waiting for be finished?
body: <p>I decided to use this third-party component to make a simple loading control in my windows form.</p>
  
  <p><a href="http://www.codeproject.com/Articles/14841/How-to-write-a-loading-circle-animation-in-NET" rel="noreferrer">http://www.codeproject.com/Articles/14841/How-to-write-a-loading-circle-animation-in-NET</a></p>
  
  <p>This works fine when turns on and off changing the property "Active" to true or false in a single request (one per time). The problem is when a process is waiting to be served, and I pretend to Active the loadingControl before the process starts and turn off when I  "think" that the process has to be finished. When I do it, the image loading is shown as a static image. (Without animation). </p>
  
  <p>I'm sorry for this question, I'm new in C#.  But I think that I need to use Threads or something similar.</p>
  
  <p>So my general code is this:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using [libraries here]...;
  namespace [namespace here]
  {
      Public partial class Form1 : Form
      {
          public Form1()
          {
              InitializeComponent();
              this.loadingCircle1.Visible = false;
          }
  
          private void button1_Click(object sender, EventArgs e)
          {
              Thread t = new Thread(new ThreadStart(showLoading));
              this.loadingCircle1.Visible = true;
              t.Start();
  
              //Import an Excel
  
              t.Abort();
          }
  
          public void showLoading()
          {
              loadingCircle1.Active = true;
              loadingCircle1.RotationSpeed = 10;
          }
      }
  }
  </code></pre>
  
  <p>But Always the Loading shows as a static image without the animation.</p>