📄 pass.frm
字号:
VERSION 5.00
Begin VB.Form pass
Caption = "图书管理系统"
ClientHeight = 3825
ClientLeft = 60
ClientTop = 435
ClientWidth = 4680
LinkTopic = "form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3825
ScaleWidth = 4680
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton cmd_cancel
Caption = "取消"
Height = 375
Left = 2520
TabIndex = 5
Top = 3000
Width = 855
End
Begin VB.CommandButton cmd_ok
Caption = "确定"
Height = 375
Left = 1200
TabIndex = 4
Top = 3000
Width = 855
End
Begin VB.Frame Frame1
Caption = "用户登录"
Height = 1335
Left = 600
TabIndex = 1
Top = 1200
Width = 3615
Begin VB.TextBox txtpwd
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 3
Top = 840
Width = 1935
End
Begin VB.TextBox txtname
Height = 375
Left = 1440
TabIndex = 2
Top = 360
Width = 1935
End
Begin VB.Label Label3
Caption = " 口 令"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 360
TabIndex = 7
Top = 840
Width = 855
End
Begin VB.Label Label2
Caption = " 用户名"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 6
Top = 360
Width = 975
End
End
Begin VB.Label label1
BackColor = &H80000014&
Caption = " 图书管理系统"
BeginProperty Font
Name = "微软雅黑"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 0
Top = 360
Width = 2415
End
End
Attribute VB_Name = "pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private n As Integer
Private Sub Form_Load()
n = 0
End Sub
Private Sub cmd_ok_click()
Dim rstpass As ADODB.Recordset
txtsql = "select * from oper where 用户名='" & Trim$(txtname.Text) & "'" & "and 口令 = '" & Trim$(txtpwd.Text) + "'"
Set rstpass = exesql(txtsql)
If rstpass.EOF = True Then
n = n + 1
If n < 3 Then
MsgBox "用户名或口令错户,继续登录", vbOKOnly + vbExclamation, "信息提示"
rstpass.Close
txtname.Text = ""
txtpwd.Text = ""
txtname.SetFocus
Else
MsgBox "已登录失败三次,退出系统", vbOKOnly + vbExclamation, "信息提示"
rstpass.Close
Unload Me
End If
Else
userlevel = Trim(rstpass.Fields("级别"))
rstpass.Close
Unload Me
menu.Show
End If
End Sub
Private Sub cmd_cancel_click()
Unload Me
End Sub
Private Sub txtname_keypress(keyascii As Integer)
Call endata(keyascii)
End Sub
Private Sub txtpwd_keypress(keyascii As Integer)
Call endata(keyascii)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -