📄 form1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
BorderStyle = 1 'Fixed Single
Caption = "Form1"
ClientHeight = 6105
ClientLeft = 45
ClientTop = 435
ClientWidth = 6540
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6105
ScaleWidth = 6540
Begin VB.CommandButton Command2
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 4320
TabIndex = 5
Top = 3000
Width = 1695
End
Begin VB.CommandButton Command1
Caption = "确定"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 735
Left = 1200
TabIndex = 4
Top = 3000
Width = 1695
End
Begin MSAdodcLib.Adodc Adodc1
Height = 615
Left = 1440
Top = 4560
Visible = 0 'False
Width = 3735
_ExtentX = 6588
_ExtentY = 1085
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=信息表.mdb;Persist Security Info=False"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=信息表.mdb;Persist Security Info=False"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 信息表 where 管理员名=""text1.text"""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text2
Height = 615
Left = 3240
TabIndex = 1
Text = "007"
Top = 1920
Width = 2775
End
Begin VB.TextBox Text1
Height = 615
Left = 3240
TabIndex = 0
Text = "小红"
Top = 840
Width = 2775
End
Begin VB.Label Label2
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 3
Top = 1920
Width = 1335
End
Begin VB.Label Label1
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1080
TabIndex = 2
Top = 960
Width = 1335
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Static act As Integer
Adodc1.RecordSource = "select * from 管理员表 where 管理员名='" & Text1.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Text2.Text = Adodc1.Recordset.Fields("密码") Then
MDIForm1.Show
Unload Me
Else
MsgBox "密码不正确!", vbOKOnly + vbExclamation, "提示"
Text2.Text = ""
Text2.SetFocus
End If
Else:
act = act + 1
If act >= 3 Then
MsgBox "登录次数超过三次,自动退出!", , "警告"
End
End If
MsgBox "该用户不存在或密码不正确!", , "提示"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Text2.PasswordChar = "*"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -