📄 user.frm
字号:
VERSION 5.00
Begin VB.Form user
BorderStyle = 3 'Fixed Dialog
Caption = "Form4"
ClientHeight = 1110
ClientLeft = 6045
ClientTop = 4935
ClientWidth = 3570
ControlBox = 0 'False
LinkTopic = "Form4"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "user.frx":0000
ScaleHeight = 1110
ScaleWidth = 3570
ShowInTaskbar = 0 'False
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access"
DatabaseName = "E:\qqiao\bysj\book.mdb"
DefaultCursorType= 0 '缺省游标
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 375
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = "student"
Top = 1440
Width = 3375
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2520
Picture = "user.frx":4375
Style = 1 'Graphical
TabIndex = 2
Top = 600
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 1320
Picture = "user.frx":6E5C
Style = 1 'Graphical
TabIndex = 1
Top = 600
Width = 975
End
Begin VB.TextBox Text1
DataField = "id"
DataSource = "Data1"
Height = 330
Left = 1320
TabIndex = 0
Top = 165
Width = 2175
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "学员账号:"
Height = 255
Left = 120
TabIndex = 3
Top = 210
Width = 1095
End
End
Attribute VB_Name = "user"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim db As Database
Dim rt As Recordset
Dim qq As String
Dim a As String
Dim i As Integer
Private Sub Command1_Click()
Form3.cmdadd.Visible = False
Form3.cmddel.Visible = False
Form3.cmdedit.Visible = False
Form3.cmdseek.Visible = True
Form3.cmdadd.Enabled = False
Form3.cmddel.Enabled = False
Form3.cmdedit.Enabled = False
Form3.cmdseek.Enabled = True
Form3.Text1.Enabled = False
Form3.Text2.Enabled = False
Form3.Text3.Enabled = False
Form3.Text4.Enabled = False
Form3.Text5.Enabled = False
Form3.Text6.Enabled = False
Form3.Text7.Enabled = False
Set db = OpenDatabase("E:\qqiao\bysj\book.mdb")
Set rt = db.OpenRecordset("student")
rt.MoveFirst
rt.Index = "id"
a = Text1.Text
rt.Seek "=", a
If i <> 2 Then
If rt.NoMatch = False Then
Form1.Hide
Form2.Hide
Form3.Show
Unload help
user.Hide
Else
qq = MsgBox("你不是本校学生!请不要冒充!", vbOKCancel, "错误")
i = i + 1
If i = 2 Then MsgBox "如果你三次错误!本程序将自动关闭"
End If
Else
MsgBox "你三次错误!本程序将自动关闭"
End
End If
End Sub
Private Sub Command2_Click()
Form1.Show
Form2.Hide
Form3.Hide
Unload help
user.Hide
End Sub
Private Sub Form_Load()
Data1.Visible = False
Text1.Text = ""
user.Caption = "学员登陆"
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -