📄 form14.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form14
BorderStyle = 1 'Fixed Single
Caption = "Form14"
ClientHeight = 4755
ClientLeft = 45
ClientTop = 405
ClientWidth = 7500
BeginProperty Font
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form14"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Form14.frx":0000
ScaleHeight = 4755
ScaleWidth = 7500
StartUpPosition = 3 '窗口缺省
Begin MSAdodcLib.Adodc Adodc1
Height = 615
Left = 360
Top = 3720
Width = 1200
_ExtentX = 2117
_ExtentY = 1085
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 1
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 3
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "DSN=qqqq"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "qqqq"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from user"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Courier"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.CommandButton Command2
Appearance = 0 'Flat
Caption = "取消"
Height = 375
Left = 4560
Style = 1 'Graphical
TabIndex = 6
Top = 3480
Width = 855
End
Begin VB.CommandButton Command1
Caption = "登录"
Height = 375
Left = 3360
Style = 1 'Graphical
TabIndex = 5
Top = 3480
Width = 855
End
Begin VB.TextBox Text2
Height = 375
Left = 3360
TabIndex = 1
Top = 2640
Width = 1935
End
Begin VB.TextBox Text1
Height = 375
Left = 3360
TabIndex = 0
Top = 1920
Width = 1935
End
Begin VB.Image Image3
Height = 240
Left = 1440
Picture = "Form14.frx":2215
Top = 840
Width = 240
End
Begin VB.Image Image2
Height = 480
Left = 2280
Picture = "Form14.frx":23A6
Top = 2640
Width = 480
End
Begin VB.Image Image1
Height = 480
Left = 2040
Picture = "Form14.frx":250F
Top = 1920
Width = 480
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "欢迎使用学生信息管理系统"
BeginProperty Font
Name = "Courier"
Size = 15
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000014&
Height = 495
Left = 1800
TabIndex = 4
Top = 840
Width = 4695
End
Begin VB.Label Label2
Alignment = 1 'Right Justify
BackStyle = 0 'Transparent
Caption = "密码:"
ForeColor = &H80000014&
Height = 375
Left = 2640
TabIndex = 3
Top = 2760
Width = 855
End
Begin VB.Label Label1
Alignment = 2 'Center
BackStyle = 0 'Transparent
Caption = "用户名:"
ForeColor = &H80000014&
Height = 255
Left = 2520
TabIndex = 2
Top = 2040
Width = 975
End
End
Attribute VB_Name = "Form14"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
Dim conn1 As String
Set conn1 = "select * from user where uid='" + Text1.Text + "'and pwd='" + Text2.Text + "'"
If Text1.Text = Adodc1.Recordset.Fields("uid") Then
If Text2.Text = Adodc1.Recordset.Fields("pwd") Then
Form1.Show
Else
MsgBox "密码不正确!"
End If
Else
MsgBox "用户名不正确!"
End If
End Sub
Private Sub Form_Load()
Set conn = New ADODB.Connection
Dim connstr As String
connstr = "DSN=qqqq"
conn.Open connstr
Set rs = New ADODB.Recordset
rs.Open "select * from user", conn
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -