Here is my code and what I expecting outcome is it will count the log in counts and when the counts reach 3 it will be banned for 3 minutes.
I put it inside the loginButton.clicked
Dim a As Integer = 0
If userTextbox.Text = "username" And passTextbox.Text = "password" Then
MsgBox("Welcome!")
Else If userTextbox.Text <> "username" And passTextbox.Text = "password" Then
a += 1
MsgBox("Username wrong!")
Else If userTextbox.Text = "username" And passTextbox.Text <> "password" Then
a += 1
MsgBox("Password wrong!")
Else
a += 1
MsgBox("Username and Password are Incorrect.")
End If
If a = 3 Then
MsgBox("Your account is banned for 3 mins. please wait")
End If
I put it inside the loginButton.clicked
Dim a As Integer = 0
If userTextbox.Text = "username" And passTextbox.Text = "password" Then
MsgBox("Welcome!")
Else If userTextbox.Text <> "username" And passTextbox.Text = "password" Then
a += 1
MsgBox("Username wrong!")
Else If userTextbox.Text = "username" And passTextbox.Text <> "password" Then
a += 1
MsgBox("Password wrong!")
Else
a += 1
MsgBox("Username and Password are Incorrect.")
End If
If a = 3 Then
MsgBox("Your account is banned for 3 mins. please wait")
End If