📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form pass
BackColor = &H8000000D&
Caption = "图书管理系统"
ClientHeight = 2940
ClientLeft = 3465
ClientTop = 2385
ClientWidth = 4215
ForeColor = &H80000017&
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 4215
Begin VB.TextBox uid
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
TabIndex = 7
Top = 960
Width = 1575
End
Begin VB.CommandButton 取消
Caption = "取消"
Height = 375
Index = 1
Left = 2400
TabIndex = 2
Top = 2400
Width = 735
End
Begin VB.CommandButton 确定
Caption = "确定"
Height = 375
Index = 0
Left = 1200
TabIndex = 1
Top = 2400
Width = 735
End
Begin VB.Frame Frame1
BackColor = &H8000000D&
Caption = "用户"
Height = 1575
Left = 600
TabIndex = 0
Top = 720
Width = 2895
Begin VB.TextBox Password
Height = 375
IMEMode = 3 'DISABLE
Left = 840
PasswordChar = "*"
TabIndex = 3
Top = 960
Width = 1575
End
Begin VB.Label Label2
Alignment = 2 'Center
BackColor = &H8000000D&
Caption = "密码"
Height = 255
Left = 240
TabIndex = 5
Top = 960
Width = 615
End
Begin VB.Label Label1
BackColor = &H8000000D&
Caption = "用户"
Height = 255
Left = 240
TabIndex = 4
Top = 360
Width = 615
End
End
Begin VB.Label Label3
Alignment = 2 'Center
BackColor = &H8000000D&
Caption = "图书管理系统"
BeginProperty Font
Name = "新宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000018&
Height = 435
Left = 1080
TabIndex = 6
Top = 120
Width = 1935
End
End
Attribute VB_Name = "pass"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer
Private Sub Form_Activate()
uid.SetFocus
End Sub
Private Sub Form_Load()
n = 0
End Sub
Private Sub 取消_Click(Index As Integer)
Unload Me
End Sub
Private Sub 确定_Click(Index As Integer)
Dim mrc As ADODB.Recordset
Dim txtsql As String
Call deldata
Call insertdata
txtsql = "select * from 登陆表 where 用户名='" & Trim$(uid.Text) & "'" & " and 密码='" & Trim$(Password.Text) + "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then
n = n + 1
If n < 3 Then
MsgBox "没有此用户,请重试", vbOKOnly + vbExclamation, "信息提示"
uid.Text = ""
Password.Text = ""
uid.SetFocus
Else
MsgBox "已3次登陆失败,退出系统", vbOKOnly + vbExclamation, "信息提示"
mrc.Close
Unload Me
End If
Else
mrc.Close
Unload Me
'MsgBox "调入主窗口", vbOKOnly + vbExclamation, "信息提示"
Menu.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -