Pr3d4t0r
New member
Ok im not sure if this is the best section but whatever,
I have an assignment to complete fro college and im doing programming, which frankly is a pain in the arse especially with a retard of a teacher that doesnt teach us anything,
I need to write a program in vb studio 2010, i have most of it completed but i need to make a login form with a 3 attempts untill it locks out the user to login and the app needs to be restarted.
heres what i have so far,
any ,literally any help will be really appreciated, also try to make it look as if its done by a newb
Public Class Logon
Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
Dim Username As String
Dim Password As String
Dim Form1 As Form
Dim Form2 As Form
Dim Count As Integer
Dim LoginTimes As Integer
LoginTimes = 0
Count = 0
Username = txtUsername.Text
Password = txtPassword.Text
Form1 = Me
Form2 = Calc_form
For LoginTimes = 0 To 2
If Username = "admin" = True And Password = "admin" = True Then
LoginTimes = 2
Form2.Show()
Me.Hide()
ElseIf Password = "admin" = False Then
MsgBox("Your password details are incorrect")
End If
If Username = "admin" = False Then
MsgBox("Your username details are incorrect")
End If
Next LoginTimes
End Sub
heres what it looks like:
I have an assignment to complete fro college and im doing programming, which frankly is a pain in the arse especially with a retard of a teacher that doesnt teach us anything,
I need to write a program in vb studio 2010, i have most of it completed but i need to make a login form with a 3 attempts untill it locks out the user to login and the app needs to be restarted.
heres what i have so far,
any ,literally any help will be really appreciated, also try to make it look as if its done by a newb

Public Class Logon
Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click
Dim Username As String
Dim Password As String
Dim Form1 As Form
Dim Form2 As Form
Dim Count As Integer
Dim LoginTimes As Integer
LoginTimes = 0
Count = 0
Username = txtUsername.Text
Password = txtPassword.Text
Form1 = Me
Form2 = Calc_form
For LoginTimes = 0 To 2
If Username = "admin" = True And Password = "admin" = True Then
LoginTimes = 2
Form2.Show()
Me.Hide()
ElseIf Password = "admin" = False Then
MsgBox("Your password details are incorrect")
End If
If Username = "admin" = False Then
MsgBox("Your username details are incorrect")
End If
Next LoginTimes
End Sub
heres what it looks like:
