by Bars (1 Submission)
Category: Encryption
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 21st June 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
This will allow the user to enter the code only three times, then it will unload the form.
Dim strPassword As String
Static intCounter As Integer
Dim intMsg As Integer
strPassword = txtPassword.Text
intCounter = intCounter + 1
If intCounter = 1 Or intCounter = 2 And strPassword <> "DOG" Then
intMsg = MsgBox("Stike " & intCounter, vbOKOnly, "Password")
End If
If intCounter > 2 And strPassword <> "DOG" Then
intMsg = MsgBox("Strike " & intCounter & " your out.", vbCritical, "Password")
Unload Form1
End If
End Sub
No comments have been posted about This will allow the user to enter the code only three times, then it will unload the form.. Why not be the first to post a comment about This will allow the user to enter the code only three times, then it will unload the form..