📄 form1.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Begin VB.Form login
BackColor = &H00FFFFC0&
ClientHeight = 3825
ClientLeft = 7185
ClientTop = 4410
ClientWidth = 5535
LinkTopic = "login"
ScaleHeight = 3825
ScaleWidth = 5535
Begin VB.Frame Frame1
BackColor = &H00808000&
BorderStyle = 0 'None
ForeColor = &H80000000&
Height = 2535
Left = 720
TabIndex = 1
Top = 1080
Width = 3855
Begin MSDataListLib.DataCombo combo1
Bindings = "Form1.frx":0000
Height = 330
Left = 1200
TabIndex = 7
Top = 480
Width = 2175
_ExtentX = 3836
_ExtentY = 582
_Version = 393216
ListField = "登陆名"
BoundColumn = "登陆名"
Text = "请选择登陆名"
End
Begin VB.TextBox text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1200
PasswordChar = "*"
TabIndex = 2
Top = 1080
Width = 2175
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 375
Left = 2160
TabIndex = 6
Top = 1800
Width = 1095
End
Begin VB.CommandButton cmdOK
Caption = "登陆"
Height = 375
Left = 720
TabIndex = 5
Top = 1800
Width = 1095
End
Begin VB.Label Label3
BackColor = &H00808000&
Caption = "密码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 4
Top = 1200
Width = 1095
End
Begin VB.Label Label2
BackColor = &H00808000&
Caption = "登陆名:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 3
Top = 480
Width = 1215
End
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2040
Top = 3120
Width = 1335
_ExtentX = 2355
_ExtentY = 661
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= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=物流配送中心数据库"
OLEDBString = "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=物流配送中心数据库"
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.Label Label1
BackColor = &H00FFFFC0&
Caption = "物流配送中心信息系统"
BeginProperty Font
Name = "宋体"
Size = 21.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00800000&
Height = 915
Left = 360
TabIndex = 0
Top = 120
Width = 4815
End
End
Attribute VB_Name = "login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim TIM As Integer
Dim myval As String
Private Sub Form_Activate()
combo1.SetFocus
End Sub
Private Sub combo1_Keydown(keycode As Integer, shift As Integer)
If keycode = vbKeyReturn Then Text1.SetFocus
End Sub
Private Sub text1_keydown(keycode As Integer, shift As Integer)
If keycode = vbKeyReturn Then cmdOK.SetFocus
If keycode = vbKeyUp Then combo1.SetFocus
If keycode = vbKeyDown Then cmdOK.SetFocus
End Sub
Private Sub cmdOK_Click()
Adodc1.RecordSource = "select * from 登陆表 where 登陆名 ='" + combo1.BoundText + "'"
Adodc1.Refresh
If Adodc1.Recordset.Fields("权限") = 1 Then
m = 1
End If
If combo1.BoundText <> "" And Text1.Text <> "" And Text1.Text = Adodc1.Recordset.Fields("密码") Then
Load main
main.Show
Unload Me
Else
If TIM = 3 Then
myval = MsgBox("密码错误", 0, "")
If myval = vbOK Then End
End If
If combo1.BoundText = "" Then
MsgBox ("请输入工号")
combo1.SetFocus
Else
If combo1.BoundText <> Adodc1.Recordset.Fields("登陆名") Then
MsgBox ("无此用户")
combo1.SetFocus
Else
If Text1.Text = "" Then
MsgBox ("请输入密码")
Text1.SetFocus
Else
If Text1.Text <> Adodc1.Recordset.Fields("密码") Then
MsgBox ("密码错误,请重新输入")
TIM = TIM + 1
Text1.SetFocus
End If
End If
End If
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -