📄 身份验证.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
BackColor = &H00C0FFC0&
Caption = "身份验证"
ClientHeight = 3420
ClientLeft = 60
ClientTop = 450
ClientWidth = 4860
LinkTopic = "Form1"
ScaleHeight = 3420
ScaleWidth = 4860
StartUpPosition = 1 '所有者中心
Begin VB.TextBox Text1
Height = 375
Left = 2040
TabIndex = 5
Top = 720
Width = 1935
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 3600
Top = 2880
Visible = 0 'False
Width = 1200
_ExtentX = 2117
_ExtentY = 582
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsm"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;Data Source=fsm"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from mumbers "
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 取消
Caption = "取消"
Height = 375
Left = 2280
TabIndex = 4
Top = 2520
Width = 1215
End
Begin VB.CommandButton 确定
Caption = "登录"
Height = 375
Left = 960
TabIndex = 3
Top = 2520
Width = 975
End
Begin VB.TextBox text2
DataSource = "Adodc1"
Height = 375
IMEMode = 3 'DISABLE
Left = 2040
PasswordChar = "*"
TabIndex = 2
Top = 1680
Width = 1935
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "密码"
Height = 495
Left = 960
TabIndex = 1
Top = 1680
Width = 855
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户名"
Height = 375
Left = 960
TabIndex = 0
Top = 720
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
End Sub
Private Sub Form_Activate()
Text1.SetFocus
End Sub
Private Sub 取消_Click()
Unload Me
End Sub
Private Sub 确定_Click()
Dim sqlstr As String
sqlstr = "select * from mumbers where mname ='" & Trim(Text1.Text) & "' and mcode = '" & Trim(Text2.Text) & "'"
Adodc1.RecordSource = sqlstr
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
MsgBox "密码错误"
Else
MsgBox "成功登陆"
Unload Me
Form3.Show
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -