📄 密码窗体.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
BackColor = &H00FFC0C0&
Caption = "密码窗体"
ClientHeight = 4350
ClientLeft = 3810
ClientTop = 3030
ClientWidth = 5115
BeginProperty Font
Name = "@楷体_GB2312"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 4350
ScaleWidth = 5115
Begin VB.TextBox Text7
DataField = "userauth"
DataSource = "Adodc1"
Height = 360
Left = 1920
TabIndex = 9
Top = 7680
Visible = 0 'False
Width = 1215
End
Begin VB.TextBox Text6
DataField = "userpassword"
DataSource = "Adodc1"
Height = 375
Left = 840
TabIndex = 8
Text = "Text6"
Top = 7680
Visible = 0 'False
Width = 975
End
Begin VB.TextBox Text5
DataField = "studentid"
DataSource = "Adodc1"
Height = 360
Left = -120
TabIndex = 7
Text = "Text5"
Top = 7680
Visible = 0 'False
Width = 975
End
Begin VB.Frame Frame1
BackColor = &H00FFC0C0&
Caption = "登录"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 2775
Left = 600
TabIndex = 0
Top = 120
Width = 3855
Begin VB.Timer Timer1
Interval = 2
Left = 0
Top = 4440
End
Begin MSAdodcLib.Adodc Adodc1
Height = 690
Left = 0
Top = 4440
Visible = 0 'False
Width = 2775
_ExtentX = 4895
_ExtentY = 1217
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 2
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=E:\数据库课程设计\db1.mdb"
OLEDBString = "Provider=Microsoft.Jet.OLEDB.3.51;Persist Security Info=False;Data Source=E:\数据库课程设计\db1.mdb"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "user"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "退出"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 2280
Style = 1 'Graphical
TabIndex = 6
Top = 1920
Width = 1095
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
Caption = "提交"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 600
MaskColor = &H00FFC0C0&
Style = 1 'Graphical
TabIndex = 5
Top = 1920
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "MS Sans Serif"
Size = 12
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
IMEMode = 3 'DISABLE
Left = 1800
PasswordChar = "*"
TabIndex = 2
Top = 1320
Width = 1815
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 285
Left = 1800
TabIndex = 1
Top = 720
Width = 1815
End
Begin VB.Label Label2
BackColor = &H00FFC0C0&
Caption = "请输入密码"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 4
Top = 1320
Width = 1215
End
Begin VB.Label Label1
BackColor = &H00FFC0C0&
Caption = "请输入学号"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 360
TabIndex = 3
Top = 720
Width = 1215
End
End
Begin VB.Label Label4
BackColor = &H00FFC0C0&
Caption = "张利斌制作"
BeginProperty Font
Name = "仿宋_GB2312"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 375
Left = 3120
TabIndex = 11
Top = 3720
Width = 1815
End
Begin VB.Label Label3
BackColor = &H00FFC0C0&
Caption = "计算机0302班"
BeginProperty Font
Name = "黑体"
Size = 24
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00404040&
Height = 495
Left = 120
TabIndex = 10
Top = 3120
Width = 3015
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "请输入学号"
Exit Sub
End If
If Text2.Text = "" Then
MsgBox "请输入密码"
Exit Sub
End If
Do
If Adodc1.Recordset.EOF Then
MsgBox "不存在这样的用户名和密码"
Exit Do
Else
If Text1.Text = Text5.Text And Text2.Text = Text6.Text And Text7.Text = 0 Then
Form2.Show
Form1.Hide
Exit Do
Else
If Text1.Text = Text5.Text And Text2.Text = Text6.Text And Text7.Text = 1 Then
Form3.Show
Form1.Hide
Exit Do
End If
End If
Adodc1.Recordset.MoveNext
End If
Loop
Adodc1.Recordset.MoveFirst
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -