title: How to use Count in login?
body: <p>I wanted to make my login with a function Count but I got no idea how. What I want is when user type wrong username and password wrong for 3 times, the program will close down and show message.</p>
  
  <pre><code> Dim i As Integer
  
      If txtUsername.Text = "username" Then
          If txtPassword.Text = "password" Then
              MessageBox.Show("I am KING!!")
              Me.Close()
          End If
      Else
          MessageBox.Show("Failed!!")
      End If
  
      If (i &gt;= 3) Then
      End If
      MessageBox.Show("Get Out")
      End
  </code></pre>
  
  <p>Please show me how to command this. Thank You</p>