📄 frmdenglu.frm
字号:
VERSION 5.00
Begin VB.Form frmdenglu
Caption = "登录"
ClientHeight = 3570
ClientLeft = 60
ClientTop = 390
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3570
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
Caption = "退出"
Height = 495
Left = 2520
TabIndex = 6
Top = 3000
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "登录"
Height = 375
Left = 360
TabIndex = 5
Top = 3000
Width = 1335
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 4
Top = 2160
Width = 2175
End
Begin VB.TextBox Text1
Height = 495
Left = 1560
TabIndex = 3
Top = 1320
Width = 2055
End
Begin VB.OptionButton Option3
Caption = "学生"
Height = 375
Left = 3120
TabIndex = 2
Top = 360
Width = 975
End
Begin VB.OptionButton Option2
Caption = "教师"
Height = 375
Left = 1920
TabIndex = 1
Top = 360
Width = 975
End
Begin VB.OptionButton Option1
Caption = "管理员"
Height = 375
Left = 600
TabIndex = 0
Top = 360
Width = 975
End
Begin VB.Label Label2
Caption = "密码:"
Height = 375
Left = 120
TabIndex = 8
Top = 2160
Width = 1335
End
Begin VB.Label Label1
Caption = "登录名:"
Height = 375
Left = 120
TabIndex = 7
Top = 1440
Width = 1215
End
End
Attribute VB_Name = "frmdenglu"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer
Dim findtag As Boolean
findtag = False
If Option1.Value = True Then
Call sjk_con
rstgly.MoveFirst
For i = 0 To rstgly.RecordCount - 1
If Text1.Text = rstgly!usename And Text2.Text = rstgly!Password Then
findtag = True
End If
rstgly.MoveNext
Next i
If findtag = True Then
MsgBox ("登陆成功")
guanliyuan.Show
Else
MsgBox ("用户名或密码错误,请重新输入!")
End If
rstgly.Close
gly.Close
End If
If Option2.Value = True Then
Call js_con
rstjs.MoveFirst
For i = 0 To rstjs.RecordCount - 1
If Text1.Text = rstjs!教师编号 And Text2.Text = rstjs!密码 Then
findtag = True
End If
rstjs.MoveNext
Next i
If findtag = True Then
MsgBox ("登陆成功")
jiaoshi.Show
Else
MsgBox ("用户名或密码错误,请重新输入!")
End If
rstjs.Close
js.Close
End If
If Option3.Value = True Then
Call xs_con
rstxs.MoveFirst
For i = 0 To rstxs.RecordCount - 1
If Text1.Text = rstxs!学号 And Text2.Text = rstxs!密码 Then
findtag = True
End If
rstxs.MoveNext
Next i
If findtag = True Then
MsgBox ("登陆成功")
xuesheng.Show
Else
MsgBox ("用户名或密码错误,请重新输入!")
End If
rstxs.Close
xs.Close
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -