title: Wait for 1 second before starting code again - VB.NET
body: <p>I desperately need help with a game I am making. For a bit of context, i am making a memory game and i have the following piece of code that is being troublesome. I have a bunch of labels on the form, 16 to be exact, with 1 randomly generated symbol placed in each. Each symbol appears in the labels twice. </p>
  
  <pre><code>      ------------------------------Continued----------------------------------------
                  'MsgBox("hello") 'used to check if the second inccorect press shows up - it does show but instantly changes colour
                  '''''''''''''''''NEED SOME CODE THAT PAUSES IT HERE'''''''''''''''
                  labels(0).ForeColor = Color.DarkRed
                  sender.ForeColor = Color.DarkRed
              End If
              flips = 1
          End If
      End If
      tmrmemory.Enabled = True ' starts the timer after the user clicks the first label
  End Sub
  </code></pre>
  
  <p>What's supposed to happen is that when the labels clicked don't match, it should show both the clicked labels for a short period before changing them both back to "DarkRed" which is the colour of the form's background. </p>
  
  <p>I have tried using a timer but then i can't use <code>sender.forecolor=color.darkred</code> because it is not declared globally. </p>
  
  <p>I have also tried using the command <code>Threading.Thread.Sleep(500)</code> but it still doesn't show the second incorrect click. I know that the code i have used works because when i use the message box, i can see both symbols and when the two clicks are correct, it stays. </p>