<div style='background-color: none transparent;'></div>

Pages

Home » , , » SIMPLE LOGIN / SECURITY IN VB 6.0

SIMPLE LOGIN / SECURITY IN VB 6.0

SCREENSHOT



CODE

Option Explicit
Dim user As String
Dim pass As String

Public LoginSucceeded As Boolean

Private Sub cmdExit_Click()
If MsgBox("Are you sure to close this Application?", vbQuestion + vbYesNo, "System") = vbYes Then
    End
End If
End Sub

Private Sub cmdLogin_Click()
user = "admin"
pass = "12345"

    If txtUserName.Text = user Then
        If txtPassword.Text = pass Then

                MsgBox "Username and Password Accepted!", vbInformation, "Login"
                'You may change this line here. call the form rather than displaying a message box!
 
        ElseIf txtPassword.Text = "" Then
            MsgBox "Password Field Empty!", vbExclamation, "Login"
        Else
   
            MsgBox "Username and Password not Matched!", vbExclamation, "Login"
        End If
    ElseIf txtUserName.Text = "" Then
        MsgBox "Username Field Empty!", vbExclamation, "Login"
    Else
        MsgBox "Invalid Username, try again!", , "Login"
        txtPassword.SetFocus
    End If

End Sub

DOWNLOAD HERE: Simple Login / Security in VB 6.0
Share this article :

No comments :

Post a Comment

 
Copyright © 2011. datasavvy . All Rights Reserved
Company Info | Contact Us | Privacy policy | Term of use | Widget | Advertise with Us | Site map
Template Modify by Creating Website . Inpire by Darkmatter Rockettheme Proudly powered by Blogger