📄 student.frm
字号:
VERSION 5.00
Begin VB.Form student
Caption = "学生登录"
ClientHeight = 3300
ClientLeft = 60
ClientTop = 450
ClientWidth = 6045
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 3300
ScaleWidth = 6045
StartUpPosition = 2 'CenterScreen
Begin VB.Frame Frame1
Caption = "学生登录"
Height = 2655
Index = 1
Left = 240
TabIndex = 0
Top = 480
Width = 5535
Begin VB.Frame Frame2
Height = 2175
Left = 3480
TabIndex = 7
Top = 240
Width = 1815
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 240
TabIndex = 10
Top = 840
Width = 1215
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 240
TabIndex = 9
Top = 1440
Width = 1215
End
Begin VB.CommandButton Command3
Caption = "新用户注册"
Height = 495
Left = 240
TabIndex = 8
Top = 240
Width = 1215
End
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 1
Top = 480
Width = 1695
End
Begin VB.TextBox Text2
Height = 375
Left = 1440
TabIndex = 2
Top = 960
Width = 1695
End
Begin VB.TextBox Text3
Height = 375
Left = 1440
TabIndex = 3
Top = 1440
Width = 1695
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "班级"
Height = 180
Left = 480
TabIndex = 6
Top = 600
Width = 360
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "学号"
Height = 180
Left = 480
TabIndex = 5
Top = 1080
Width = 360
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "姓名"
Height = 180
Left = 480
TabIndex = 4
Top = 1560
Width = 360
End
End
Begin VB.Label Label4
Caption = "试卷生成和评分系统"
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 1440
TabIndex = 11
Top = 120
Width = 3735
End
End
Attribute VB_Name = "student"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim n As Integer
Private Sub Command2_Click()
Unload Me
qidong.Show
End Sub
Private Sub Command3_Click()
newuser.Show
End Sub
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select * from 学生情况 where 班级='" & _
Trim$(Text1.Text) & "'" & " and 学号='" & Trim$(Text2.Text) + "'" & " and 姓名 = '" & Trim(Text3.Text) & "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then
MsgBox "没有这个用户,继续登录", vbOKOnly, "信息提示"
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text1.SetFocus
Else
mrc.Close
Me.Hide
test.Show
End If
End Sub
Private Sub Form_Load()
n = 0
End Sub
Private Sub Text3_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1_Click
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -