📄 登陆.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form2
Caption = "登陆"
ClientHeight = 5085
ClientLeft = 60
ClientTop = 345
ClientWidth = 6570
LinkTopic = "Form2"
ScaleHeight = 5085
ScaleWidth = 6570
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 3480
TabIndex = 5
Top = 2880
Width = 1215
End
Begin VB.CommandButton Command1
Caption = "登陆"
Height = 495
Left = 1080
TabIndex = 4
Top = 2880
Width = 1215
End
Begin MSAdodcLib.Adodc Adodc1
Height = 735
Left = 1080
Top = 3600
Visible = 0 'False
Width = 4215
_ExtentX = 7435
_ExtentY = 1296
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=是杂点"
OLEDBString = ""
OLEDBFile = ""
DataSourceName = "是杂点"
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from 用户表"
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.TextBox Text2
Height = 495
IMEMode = 3 'DISABLE
Left = 3480
PasswordChar = "*"
TabIndex = 3
Top = 1560
Width = 1215
End
Begin VB.TextBox Text1
DataSource = "Adodc1"
Height = 495
Left = 3480
TabIndex = 2
Top = 480
Width = 1215
End
Begin VB.Label Label2
Alignment = 2 'Center
Caption = "输入密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 1
Top = 1560
Width = 1215
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "输入用户名"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 840
TabIndex = 0
Top = 600
Width = 1815
End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim micount As Integer
Dim str As String
Private Sub Command1_Click()
Dim sqlstr As String
sqlstr = "select * from 用户表 where 用户名='" & Trim(Text1.Text) & "'"
Adodc1.RecordSource = sqlstr
Adodc1.Refresh
If Adodc1.Recordset.BOF Then
MsgBox "用户名错误,请重新输入", vbExclamation, "警告"
Text1.Text = ""
Text1.SetFocus
Else
str = Adodc1.Recordset.Fields("密码")
If Trim(str) = Text2.Text Then
Form3.Show
Unload Me
Else
MsgBox "密码错误,请重新输入", vbExclamation, "警告"
Text2.Text = ""
Text2.SetFocus
End If
End If
micount = micount + 1
If micount = 3 Then
Unload Me
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -