- Joined
- Feb 14, 2007
- Messages
- 727
- Trophies
- 0
- Age
- 33
- Location
- London
- Website
- Visit site
- XP
- 361
- Country
Hi guy basically i got a problem, im making a basic login program in vb and i need to implement a loop with the login program. Basically i was wondering if anyone has any idea of what type of loop i need and how i would implement this in to my code. The loop need do count how many times the enter a wrong password some thing like "You entered the password or username wrong you have 2 tries left" and i want it to do it 3 time and if failed close the program. Anyone got any clue of how to do this?
Thanks in advance
Here my code currently
Thanks in advance
Here my code currently
Public Class Form1
Private Sub btnLogon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogon.Click
Dim NextForm As New Form2
If txtUser.Text = "admin" And txtPass.Text = "pass" Then
NextForm.Show()
Me.Hide()
End If
txtUser.Text = ""
txtPass.Text = ""
End Sub
End Class
Private Sub btnLogon_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogon.Click
Dim NextForm As New Form2
If txtUser.Text = "admin" And txtPass.Text = "pass" Then
NextForm.Show()
Me.Hide()
End If
txtUser.Text = ""
txtPass.Text = ""
End Sub
End Class