📄 frmload.frm
字号:
VERSION 5.00
Begin VB.Form frmload
BorderStyle = 3 'Fixed Dialog
Caption = "用户登陆"
ClientHeight = 3615
ClientLeft = 4785
ClientTop = 2970
ClientWidth = 4515
Icon = "frmload.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3615
ScaleWidth = 4515
ShowInTaskbar = 0 'False
Begin VB.Frame Frame1
Height = 1935
Left = 240
TabIndex = 3
Top = 720
Width = 3975
Begin VB.TextBox username
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1440
TabIndex = 5
Text = "admin"
Top = 600
Width = 2295
End
Begin VB.TextBox userinfor
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 4
Text = "11"
Top = 1320
Width = 2295
End
Begin VB.Label Label2
Caption = "用户名称:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 7
Top = 720
Width = 1455
End
Begin VB.Label Label3
Caption = "用户密码:"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 6
Top = 1440
Width = 1695
End
End
Begin VB.CommandButton cmdcancel
Caption = "取消"
Height = 495
Left = 2760
TabIndex = 2
Top = 3000
Width = 1095
End
Begin VB.CommandButton cmdok
Caption = "确定"
Height = 495
Left = 1320
TabIndex = 1
Top = 3000
Width = 1095
End
Begin VB.Label Label1
Caption = "考试阅卷系统v1.0"
BeginProperty Font
Name = "宋体"
Size = 24
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 615
Left = 240
TabIndex = 0
Top = 120
Width = 4455
End
End
Attribute VB_Name = "frmload"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdOK_Click()
Dim sql As String
Dim rs As ADODB.Recordset
If Trim(username.Text = "") Then
MsgBox "没有输入用户名称", vbOKOnly + vbExclamation, "警告"
username.SetFocus
Else
sql = "select * from admin where admin='" & username.Text & "'"
Set rs = getRS(sql)
If rs.EOF = True Then
MsgBox "没有这个用户名称", vbOKOnly + vbExclamation, "警告"
username.SetFocus
Else
If Trim(rs.Fields(1)) = Trim(userinfor.Text) Then
rs.Close
Me.Hide
mdifrm.Show
Unload Me
Else
MsgBox "密码不正确,请重新输入", vbOKOnly + vbExclamation, "警告"
username.SetFocus
userinfor.Text = ""
End If
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -