Friday, September 13, 2019

Login Timer in Visual Basic 6

Here is a simple login time in Visual Basic 6 written by my close friend, business partner, and fellow software engineer Sir Larry Emol. A login timer that can be used to protect your application from intruders.

I am currently accepting programming work, IT projects, school and application development, programming projects, thesis and capstone projects, IT consulting work, computer tutorials, and web development work kindly contact me in the following email address for further details.  If you want to advertise on my website kindly contact me also in my email address also. Thank you.

My email address is the following jakerpomperada@gmail.com, jakerpomperada@aol.com, and jakerpomperada@yahoo.com.

My mobile number here in the Philippines is 09173084360.

My telephone number at home here in Bacolod City, Negros Occidental Philippines is  +63 (034) 4335675.

Here in Bacolod I also accepting computer repair, networking and Arduino Project development at a very affordable price.

My personal website is http://www.jakerpomperada.com





Sample Program Output


Program Listing


Private Sub Command1_Click()
On Error Resume Next

 Set rstUserAcct = New ADODB.Recordset
    If rstUserAcct.State = 1 Then rstUserAcct.Close
    rstUserAcct.Open "Select * from tblInfo where Username = '" & Text1.Text & "'", MyConn, adOpenDynamic, adLockBatchOptimistic
    
    
    If Me.Text1.Text = "" Then
    MsgBox "Enter Username", vbInformation, "Username"
    Me.Text1.SetFocus
    Exit Sub
    End If
    
    If Me.Text2.Text = "" Then
    MsgBox "Enter Password", vbInformation, "Password"
    Me.Text2.SetFocus
    Exit Sub
    End If
    
    If rstUserAcct.RecordCount = 0 Then
    MsgBox "Username not found", vbInformation, "Password"
    Exit Sub
    End If
           
            
If rstUserAcct.Fields("Password") = Text2.Text Then
            
                Unload Me
                Mainform.Show
                
Else
MsgBox "Invalid Password!", vbExclamation, "Sample App"
End If
End Sub

Private Sub Timer1_Timer()
 Label1.Caption = Label1.Caption - 1
    If Label1.Caption = 0 Then
        MsgBox "Login timeout!", vbInformation, "Login"
        End
    End If
End Sub




No comments:

Post a Comment