📄 frmdenlu.frm
字号:
VERSION 5.00
Begin VB.Form 登陆
Caption = "登陆"
ClientHeight = 6225
ClientLeft = 3360
ClientTop = 2880
ClientWidth = 8865
Icon = "Frmdenlu.frx":0000
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 6225
ScaleWidth = 8865
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Height = 420
Left = 4920
Picture = "Frmdenlu.frx":0442
Style = 1 'Graphical
TabIndex = 6
Top = 4560
Width = 1215
End
Begin VB.CommandButton Command1
Height = 420
Left = 2280
Picture = "Frmdenlu.frx":099D
Style = 1 'Graphical
TabIndex = 5
Top = 4560
Width = 1215
End
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H80000004&
ForeColor = &H80000008&
Height = 3375
Left = 720
TabIndex = 0
Top = 840
Width = 6975
Begin VB.ComboBox Combo1
Height = 300
ItemData = "Frmdenlu.frx":0F74
Left = 2880
List = "Frmdenlu.frx":0F7E
TabIndex = 9
Text = "选择类型"
Top = 600
Width = 2055
End
Begin VB.TextBox Text2
Appearance = 0 'Flat
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 350
IMEMode = 3 'DISABLE
Left = 2880
PasswordChar = "*"
TabIndex = 4
Top = 2160
Width = 2055
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H80000018&
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 350
Left = 2880
TabIndex = 2
Top = 1440
Width = 2055
End
Begin VB.Label Label4
Caption = "用户类型:"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1200
TabIndex = 8
Top = 600
Width = 1575
End
Begin VB.Label Label2
Caption = "密码:"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Left = 1200
TabIndex = 3
Top = 2160
Width = 975
End
Begin VB.Label Label1
Caption = "用户名:"
BeginProperty Font
Name = "华文行楷"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 255
Left = 1200
TabIndex = 1
Top = 1440
Width = 1335
End
End
Begin VB.Image Image4
Height = 480
Left = 960
Picture = "Frmdenlu.frx":0F94
Top = 4560
Width = 480
End
Begin VB.Label Label3
Caption = "计算机网络与软件应用"
BeginProperty Font
Name = "华文行楷"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 615
Left = 1920
TabIndex = 7
Top = 240
Width = 5175
End
End
Attribute VB_Name = "登陆"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select username from use where username='" & Trim(Text1.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
Text1.SetFocus
Text1.SelStart = 0
Text1.SelLength = Len(Text1.Text)
Exit Sub
End If
username = mrc.Fields(0)
txtsql = "select username from use where password='" & Trim(Text2.Text) & "'"
Set mrc = ExecuteSQL(txtsql)
If mrc.EOF = True Then
MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
Text2.SetFocus
Text2.SelStart = 0
Text2.SelLength = Len(Text2.Text)
Exit Sub
End If
Open_use
Do While cnn.EOF = False
If cnn.EOF = True Then
cnn.Clone
Exit Sub
End If
If cnn.Fields(0) = username Then
If cnn.Fields(2) <> Trim(Combo1.Text) Then
MsgBox " 错误!", vbExclamation + vbOKOnly, "警告"
Exit Sub
End If
End If
cnn.MoveNext
Loop
学生信息管理系统.Show
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text2.SetFocus
End If
End Sub
Private Sub Text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Command1.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -