📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 3240
TabIndex = 3
Top = 1800
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1800
TabIndex = 2
Top = 1800
Width = 1095
End
Begin VB.TextBox txtlog
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 2880
PasswordChar = "*"
TabIndex = 1
Top = 1080
Width = 1215
End
Begin VB.TextBox txtlog
Height = 375
Index = 0
Left = 2880
TabIndex = 0
Top = 480
Width = 1215
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "口 令"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1920
TabIndex = 5
Top = 1080
Width = 525
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 1920
TabIndex = 4
Top = 600
Width = 630
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const maxlogtimes As Integer = 3
Private Sub Command1_Click()
Static intlogtimes As Integer
intlogtimes = intlogtimes + 1
If intlogtimes > maxlogtimes Then
MsgBox "你已经超过允许的登录验证次数!" & vbCr & "应用程序将结束!", vbCritical, "登录验证"
End
Else
With library_manage.rssysusers
.Open
If .RecordCount > 0 Then
.MoveFirst
.Find "用户名='" & Trim(txtlog(0)) & "'"
If .EOF Then
MsgBox Trim(txtlog(0)) & "不是系统用户,请检查输入", vbCritical, "登录验证"
txtlog(0).Text = ""
txtlog(1).Text = ""
txtlog(0).SetFocus
txtlog(0).SelStart = 0
txtlog(0).SelLength = Len(txtlog(0))
ElseIf .Fields("口令") <> Trim(txtlog(1)) Then
MsgBox " 口令错误", vbCritical, "登录验证"
txtlog(1).SetFocus: txtlog(1) = ""
Else
currentusernum = .Fields("用户名")
currentuserpassword = .Fields("口令")
currentuserstatus = .Fields("权限")
MsgBox "欢迎使用图书资料管理系统!", vbInformation, "登录成功"
Unload Me
End If
End If
.Close
End With
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -