by G.Chandrasekar (2 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 26th July 2001
Date Added: Mon 8th February 2021
Rating:
(1 Votes)
Login Form
API Declarations
create two textboxes and label box
Text1.Text = "Name ex:aa"
Text2.SetFocus
Text1.Locked = True
End Sub
Private Sub Form_Load()
Text2 = ""
Label4.Caption = Date$
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
If Text2.Text = "Name Mentioned above ex:aa" Then
Form2.show 'form to be displayed after login entry
Unload Form1
Form1.Visible = False
Else
MsgBox "Login Denied", vbCritical, "Login Error"
Text2.SetFocus
Text2.Text = ""
End If
End If
End Sub