📄 passwrdfrm.frm
字号:
X2 = 11880
Y1 = 3360
Y2 = 3360
End
Begin VB.Line Line3
Visible = 0 'False
X1 = 6120
X2 = 6120
Y1 = 1920
Y2 = 3360
End
Begin VB.Line Line2
BorderColor = &H80000017&
Visible = 0 'False
X1 = 6120
X2 = 11880
Y1 = 1920
Y2 = 1920
End
Begin VB.Label Label3
BackColor = &H80000001&
BackStyle = 0 'Transparent
Caption = "Type your password"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 375
Left = 7320
TabIndex = 5
Top = 2760
Visible = 0 'False
Width = 1815
End
Begin VB.Line Line1
BorderColor = &H00000000&
X1 = 6120
X2 = 6120
Y1 = 600
Y2 = 6360
End
Begin VB.Label Label2
BackColor = &H80000001&
BackStyle = 0 'Transparent
Caption = "To begin ,click your user name"
BeginProperty Font
Name = "Century Gothic"
Size = 14.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000000FF&
Height = 735
Left = 360
TabIndex = 4
Top = 5280
Width = 6255
End
Begin VB.Label Label1
BackColor = &H80000001&
BackStyle = 0 'Transparent
Caption = "Accountant"
BeginProperty Font
Name = "Verdana"
Size = 15.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H000080FF&
Height = 495
Left = 7320
MousePointer = 11 'Hourglass
TabIndex = 1
Top = 2280
Width = 2055
End
End
Attribute VB_Name = "PassWrdFrm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
text1.Text = Clear
Text2.Text = Clear
End Sub
Private Sub cmdOK_Click()
Dim Connection As New Connection
Dim Rs As New ADODB.Recordset
Rs.Open "Select * from Users", frmMain.Cn, adOpenStatic, adLockReadOnly
' Cleanup
Dim password As String
password = UCase(Trim(Rs!password))
Set Connection = Nothing
Set Rs = Nothing
If Text2.Text = "" Then
MsgBox "Please! Enter Password to LogOn to System", vbCritical + vbOKOnly, "Password Authority "
'Text2.SetFocus
Exit Sub
ElseIf (UCase(Trim(Text2.Text)) <> password) Then
MsgBox "Please! Enter Correct Password ", vbInformation + vbOKOnly, "Password Authority"
Text2.Text = Clear
Text2.SetFocus
Exit Sub
ElseIf UCase(Trim(Text2.Text)) = password Then
Label8.Visible = True
Label9.Visible = True
Label10.Visible = True
Label11.Visible = True
Timer1.Enabled = True
Check = False
PB1.Visible = True
'Unload BlackFrm
'MainFrm.Show vbModal
'frmMain.Show
End If
End Sub
Sub menulogon()
frmMain.mnuFile.Enabled = True
frmMain.mnuDataentry.Enabled = True
'frmMain.mnuvisitors.Enabled = True
frmMain.mnuemployee.Enabled = True
frmMain.rep.Enabled = True
frmMain.mnuwindows.Enabled = True
frmMain.hel.Enabled = True
frmMain.mnuexamination.Enabled = True
End Sub
Private Sub Command1_Click()
Unload PassWrdFrm
End Sub
Private Sub Form_Activate()
Dither Me
End Sub
Private Sub Form_Click()
Text2.Visible = False
Label3.Visible = False
Line2.Visible = False
Line3.Visible = False
Line4.Visible = False
cmdOK.Visible = False
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If (KeyAscii = 13) Then
Call cmdOK_Click
End If
End Sub
Private Sub Form_Load()
'BlackFrm.Show
Text2.PasswordChar = "*"
Text2.Text = Clear
Dither Me
frmMain.MakeConnection
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Line5.Visible = False
Picture7.Visible = True
Label1.ForeColor = &HC0C0C0
End Sub
Private Sub Label1_Click()
Text2.Visible = True
Label3.Visible = True
Line2.Visible = True
Line3.Visible = True
Line4.Visible = True
cmdOK.Visible = True
Text2.SetFocus
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFFFFFF
Picture2.Visible = True
Picture7.Visible = False
End Sub
Private Sub Label4_Click()
Unload PassWrdFrm
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
'Line5.Visible = True
End Sub
Private Sub Picture2_Click()
Text2.Visible = True
Label3.Visible = True
Line2.Visible = True
Line3.Visible = True
Line4.Visible = True
cmdOK.Visible = True
Text2.SetFocus
End Sub
Private Sub Text1_Change()
End Sub
Private Sub Picture6_Click()
End
End Sub
Private Sub Picture7_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Picture2.Visible = True
Picture7.Visible = False
Label1.ForeColor = &HFFFFFF
End Sub
Private Sub Timer1_Timer()
Static C As Integer
Static d As Integer
C = C + Timer1.Interval
PB1.Value = C
If (C Mod 100 = 0) Then
d = d + 2
Label11.Caption = d
End If
If (PB1.Value >= 5000) Then
Timer1.Enabled = False
C = 0
d = 0
Unload Me
Set PassWrdFrm = Nothing
Call menulogon
'MainFrm.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -