title: How to correctly pause/delay Windows Forms application
body: <p>I am a beginner to the OOP and the C#.</p>
  
  <p>I am working on a quiz game using the Windows Forms.
  My problem is related to two classes, the <strong>form</strong> and the <strong>game logic</strong>.
  I have a basic UI with classic Froms controls. Take a look.</p>
  
  <p><a href="https://i.stack.imgur.com/n48gQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/n48gQ.png" alt="UI layout"></a></p>
  
  <p>The thing I want to achieve is, when a player presses any answer button, it will higlight that pressed button by red or green color, depending on if it is right or wrong answer. After changing the color I want the program to wait for a while and then go to the next question.</p>
  
  <p><em>Probelm is, that I don´t know how to achieve this correctly. I don´t know how to work with threads and how exactly the Form app works related to threads. Should I use a thread sleep or a timer or a async?</em></p>
  
  <p>I will show you the method in game logic class which should handle this.</p>
  
  <pre><code>public static void Play(char answer) //Method gets a char representing a palyer answer
      {
          if (_rightAnswer == answer) //If the answer is true, the button should become green
          {
              Program.MainWindow.ChangeBtnColor(answer, System.Drawing.Color.LightGreen);
              _score++;
          }
          else //Otherwise the button becomes Red
          {
              Program.MainWindow.ChangeBtnColor(answer, System.Drawing.Color.Red);
          }
  
          //SLEEP HERE
  
          if (!(_currentIndex &lt; _maxIndex)) //If it is the last question, show game over
          {
              Program.MainWindow.DisplayGameOver(_score);
          }
          else //If it is not the last question, load next question and dispaly it and finally change the button color to default
          {
              _currentIndex++;
              _currentQuestion = Database.ListOfQuestions.ElementAt(_currentIndex);
              _rightAnswer = _currentQuestion.RightAnswer;
              Program.MainWindow.DisplayStats(_score, _currentIndex + 1, _maxIndex + 1);
              Program.MainWindow.DisplayQuestion(_currentQuestion.Text);
              Program.MainWindow.DisplayChoices(_currentQuestion.Choices);
          }
          Program.MainWindow.ChangeBtnColor(answer, System.Drawing.SystemColors.ControlLight);
      }
  </code></pre>
  
  <p>I don´t want to completely block the UI but also I don´t want users to make other events by pressing other buttons during the pause. Because it will result in improper run of app.</p>