📄 frmlog.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmLog
BorderStyle = 5 'Sizable ToolWindow
Caption = "用户登录"
ClientHeight = 3930
ClientLeft = 5385
ClientTop = 3885
ClientWidth = 5295
FillStyle = 0 'Solid
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3930
ScaleWidth = 5295
ShowInTaskbar = 0 'False
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = 720
Top = 4080
Width = 1815
_ExtentX = 3201
_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 = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
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.CommandButton Command2
Cancel = -1 'True
Caption = "取消"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2880
TabIndex = 7
Top = 3000
Width = 975
End
Begin VB.CommandButton Command1
Caption = "确定"
Default = -1 'True
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 1200
TabIndex = 6
Top = 3000
Width = 975
End
Begin VB.Frame Frame1
Height = 2295
Left = 600
TabIndex = 1
Top = 600
Width = 3975
Begin VB.TextBox TxtPW
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
IMEMode = 3 'DISABLE
Left = 1290
PasswordChar = "*"
TabIndex = 5
Top = 1200
Width = 1695
End
Begin VB.TextBox TxtUser
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1290
TabIndex = 3
Top = 600
Width = 1695
End
Begin VB.Label Label4
AutoSize = -1 'True
Caption = "密 码:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 480
TabIndex = 4
Top = 1275
Width = 735
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "操作员:"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 210
Left = 480
TabIndex = 2
Top = 675
Width = 735
End
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "用户登录"
BeginProperty Font
Name = "黑体"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 315
Left = 1920
TabIndex = 0
Top = 120
Width = 1260
End
End
Attribute VB_Name = "FrmLog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Adodc1.ConnectionString = conn '连接数据库
SQL = "select * from Users where username='" & Trim(TxtUser) & "' and pw= '" & Trim(TxtPW) & "'"
Adodc1.RecordSource = SQL
Adodc1.Refresh
If Adodc1.Recordset.RecordCount = 0 Then
aa = MsgBox("密码错误或不存在此用户", vbOKOnly + vbCritical, "警告")
Else
frmMain.khjbxxgl.Enabled = True
frmMain.xsgl.Enabled = True
frmMain.sjgl.Enabled = True
frmMain.hjzx.Enabled = True
frmMain.log.Enabled = False
Unload Me
MsgBox "欢迎登录客户管理信息系统!", vbInformation + vbOKOnly, ""
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -