Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

hello can anyone here can help my simple problem?

$
0
0
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

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>