title: How can I set delay between code lines in C#?
body: <p>I am new to c# and I am using windows forms.</p>
  
  <p>I have <code>form1</code> with 3 <code>buttons</code>. I am trying to set the 3 buttons so they appear one by one when/after the form loads . I used the following code but it did not work when I run the program the 3 buttons appear in the same time</p>
  
  <pre><code> private void MainForm_Load(object sender, EventArgs e)
      {    //Hide all buttons
          button1.Visible = false;
          button2.Visible = false;
          button3.Visible = false;
  
  
          Thread.Sleep(500);
  
         //show buttons one by one
          button1.Visible = true;
          Thread.Sleep(500);
          button2.Visible = true;
          Thread.Sleep(500);
          button3.Visible = true;
  
  
      }
  </code></pre>
  
  <p>I do not know what I am doing wrong. Can anyone help me how can I make the 3 buttons appear one by one when/after the form loads. I am happy to receive any other ideas . Thank you</p>