by Raghuraja. C (21 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th August 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Ready made Login Screen
API Declarations
Save as frmLogin.frm
Open new Exe Project
Inclide this form and work
Begin VB.Form frmLogin
AutoRedraw = -1 'True
BackColor = &H00C0E0FF&
BorderStyle = 0 'None
Caption = "Login"
ClientHeight = 4035
ClientLeft = 0
ClientTop = 0
ClientWidth = 6675
ClipControls = 0 'False
ControlBox = 0 'False
FillColor = &H00FFFFFF&
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "frmLogin"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4035
ScaleWidth = 6675
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.PictureBox picTitle
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 435
Left = 30
ScaleHeight = 405
ScaleWidth = 6585
TabIndex = 8
TabStop = 0 'False
Top = 30
Width = 6615
Begin VB.Label lblTitle
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "Login"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 315
Index = 0
Left = 0
TabIndex = 9
Top = 30
Width = 6495
End
End
Begin VB.PictureBox picButton
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BeginProperty Font
Name = "Verdana"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 975
Left = 30
ScaleHeight = 945
ScaleWidth = 6585
TabIndex = 7
TabStop = 0 'False
Top = 3030
Width = 6615
Begin VB.CommandButton cmdCancel
Caption = "&Cancel"
Height = 525
Left = 3360
TabIndex = 5
Top = 210
Width = 1245
End
Begin VB.CommandButton cmdOK
Caption = "&OK"
Height = 525
Left = 2070
TabIndex = 4
Top = 210
Width = 1245
End
End
Begin VB.PictureBox picLogin
Appearance = 0 'Flat
AutoRedraw = -1 'True
BackColor = &H00C0C0C0&
BeginProperty Font
Name = "Verdana"
Size = 11.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 2535
Left = 30
ScaleHeight = 2505
ScaleWidth = 6585
TabIndex = 6
TabStop = 0 'False
Top = 480
Width = 6615
Begin VB.ComboBox cmbUserCode
Appearance = 0 'Flat
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 128
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
IMEMode = 3 'DISABLE
Left = 3000
TabIndex = 1
Top = 750
Width = 3045
End
Begin VB.TextBox txtPassword
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
BeginProperty Font
Name = "MS Sans Serif"
Size = 11.25
Charset = 128
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 390
IMEMode = 3 'DISABLE
Left = 3000
MaxLength = 20
PasswordChar = "*"
TabIndex = 3
Top = 1320
Width = 3045
End
Begin VB.Label lblCover
Appearance = 0 'Flat
BackColor = &H00404080&
BeginProperty Font
Name = "MS Sans Serif"
Size = 9.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 405
Index = 0
Left = 3060
TabIndex = 10
Top = 1350
Width = 3015
End
Begin VB.Image imgKey
Appearance = 0 'Flat
Height = 645
Left = 270
Stretch = -1 'True
Top = 810
Width = 765
End
Begin VB.Label lblUserName
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "&User Code:"
ForeColor = &H00800000&
Height = 240
Left = 1440
TabIndex = 0
Top = 750
Width = 1020
End
Begin VB.Label lblPassword
BackColor = &H00C0C0C0&
Caption = "&Password:"
ForeColor = &H00800000&
Height = 315
Left = 1440
TabIndex = 2
Top = 1305
Width = 1245
End
End
Begin VB.Shape shpCover
BorderColor = &H00000040&
Height = 4035
Left = 0
Top = 0
Width = 6675
End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdCancel_Click()
Unload Me
End
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdOK_Click()
'Validate the Login User/Password if Ok then
Unload Me
'mdiMain.Show
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmbUserCode_GotFocus()
lblUserName.Font.Bold = True
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmbUserCode_LostFocus()
lblUserName.Font.Bold = False
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub txtPassword_GotFocus()
lblPassword.Font.Bold = True
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub txtPassword_LostFocus()
lblPassword.Font.Bold = False
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdOK_GotFocus()
cmdOK.Font.Bold = True
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdOK_LostFocus()
cmdOK.Font.Bold = False
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdCancel_GotFocus()
cmdCancel.Font.Bold = True
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Private Sub cmdCancel_LostFocus()
cmdCancel.Font.Bold = False
End Sub
'*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*