📄 frm_login.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Frm_login
BackColor = &H00FF8080&
BorderStyle = 1 'Fixed Single
Caption = "登陆窗口"
ClientHeight = 3315
ClientLeft = 4980
ClientTop = 4590
ClientWidth = 4530
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "Frm_login.frx":0000
ScaleHeight = 3315
ScaleWidth = 4530
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Index = 1
Left = 2280
PasswordChar = "*"
TabIndex = 1
Top = 1320
Width = 1335
End
Begin VB.TextBox Text1
Height = 375
Index = 0
Left = 2280
TabIndex = 0
Top = 480
Width = 1335
End
Begin VB.CommandButton Cmdexit
Caption = "取消"
Height = 345
Left = 2520
TabIndex = 3
Top = 2400
Width = 975
End
Begin VB.CommandButton Cmdok
Caption = "登陆"
Default = -1 'True
Height = 345
Left = 1080
TabIndex = 2
Top = 2400
Width = 975
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 2760
Top = 2880
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_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;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=shop"
OLEDBString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=shop"
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 Label2
BackStyle = 0 'Transparent
Caption = " 密码:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1200
TabIndex = 5
Top = 1320
Width = 735
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "用户名:"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 960
TabIndex = 4
Top = 600
Width = 855
End
Begin VB.Image Image1
Height = 825
Left = 0
Picture = "Frm_login.frx":51F74
Top = 0
Width = 780
End
End
Attribute VB_Name = "Frm_login"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Cmdexit_Click()
End
End Sub
Private Sub Cmdok_Click()
Dim MPassword As String
If Text1(0).Text = "Admin" And Text1(1).Text = "" Then
Frm_main.StatusBar1.Panels.Item(2).Text = "当前操作员:Admin"
Name1 = Text1(0).Text
Unload Me
Frm_main.Show 0
Else
Adodc1.RecordSource = "select * from 用户表 where 用户名称 = '" & Text1(0).Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
MPassword = Adodc1.Recordset.Fields("用户名称")
If Text1(1).Text = MPassword Then
Name1 = Text1(0).Text
Frm_main.lsdgl.Enabled = False
Frm_main.yhgl.Enabled = False
Frm_main.StatusBar1.Panels.Item(2).Text = "当前操作员:" + Adodc1.Recordset.Fields("用户名称")
Frm_main.Show 0
Unload Me
Else
MsgBox "密码不正确,请重新输入"
Text1(1).Text = ""
Text1(1).SetFocus
End If
Else
MsgBox "对不起,没有此用户的信息!"
Text1(0).Text = ""
Text1(1).Text = ""
End If
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -