📄 frm_xtdl.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frm_czydl
Caption = "系统登录"
ClientHeight = 2940
ClientLeft = 4260
ClientTop = 3345
ClientWidth = 5295
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2940
ScaleWidth = 5295
Begin VB.TextBox Text3
DataField = "用户名"
DataSource = "Adodc1"
Height = 270
Left = 1680
TabIndex = 9
Text = "Text3"
Top = 3720
Width = 1215
End
Begin MSComctlLib.ImageList ImageList1
Left = 1680
Top = 720
_ExtentX = 1005
_ExtentY = 1005
BackColor = -2147483643
ImageWidth = 32
ImageHeight = 32
MaskColor = 12632256
_Version = 393216
BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628}
NumListImages = 1
BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frm_xtdl.frx":0000
Key = ""
EndProperty
EndProperty
End
Begin MSComctlLib.ListView ListView1
Height = 1815
Left = 0
TabIndex = 8
Top = 0
Width = 5295
_ExtentX = 9340
_ExtentY = 3201
LabelWrap = -1 'True
HideSelection = -1 'True
_Version = 393217
Icons = "ImageList1"
ForeColor = -2147483640
BackColor = -2147483643
BorderStyle = 1
Appearance = 1
NumItems = 0
End
Begin MSAdodcLib.Adodc Adodc1
Height = 375
Left = 1320
Top = 4200
Width = 2175
_ExtentX = 3836
_ExtentY = 661
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;User ID=sa;Data Source=cggl"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=cggl"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from Table_xxdl"
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 Text4
DataField = "口令"
DataSource = "Adodc1"
Height = 375
Left = 1680
TabIndex = 7
Text = "Text4"
Top = 3120
Width = 1215
End
Begin VB.Frame Frame1
Height = 700
Left = 0
TabIndex = 2
Top = 1800
Width = 5295
Begin VB.TextBox Text2
BackColor = &H00C0E0FF&
Height = 300
Left = 960
TabIndex = 6
Text = "mr"
Top = 240
Width = 1695
End
Begin VB.TextBox Text1
BackColor = &H00C0E0FF&
Height = 300
IMEMode = 3 'DISABLE
Left = 3360
PasswordChar = "*"
TabIndex = 3
Top = 240
Width = 1815
End
Begin VB.Label Label2
Caption = "口令"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 2800
TabIndex = 5
Top = 300
Width = 615
End
Begin VB.Label Label1
Caption = "用户名"
BeginProperty Font
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C00000&
Height = 255
Left = 150
TabIndex = 4
Top = 300
Width = 735
End
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 350
Left = 3240
TabIndex = 1
Top = 2600
Width = 975
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 345
Left = 4320
TabIndex = 0
Top = 2600
Width = 975
End
End
Attribute VB_Name = "frm_czydl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem '定义一个ListItem对象
Dim a
Dim key, i As String '定义字符串变量
Private Sub Command1_Click()
If Text2.Text = "mr" And Text1.Text = "mingrisoft" Then
frm_main.Check1.Value = 1
frm_main.Check2.Value = 1
frm_main.Check3.Value = 1
frm_main.Check4.Value = 1
frm_main.Check5.Value = 1
frm_main.Check6.Value = 1
frm_main.StatusBar1.Panels.Item(3).Text = "当前操作员: mr"
Unload Me
frm_main.Show
Else
Adodc1.RecordSource = "select * from Table_xxdl where 用户名 ='" & Text2.Text & "'"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
If Trim(Text1.Text) = Trim(Text4.Text) Then
frm_main.Check1.Value = Adodc1.Recordset.Fields("系统维护")
frm_main.Check2.Value = Adodc1.Recordset.Fields("采购管理")
frm_main.Check3.Value = Adodc1.Recordset.Fields("到货管理")
frm_main.Check4.Value = Adodc1.Recordset.Fields("退货管理")
frm_main.Check5.Value = Adodc1.Recordset.Fields("库存管理")
frm_main.Check6.Value = Adodc1.Recordset.Fields("报表统计")
frm_main.StatusBar1.Panels.Item(3).Text = "当前操作员: " + Adodc1.Recordset.Fields("用户名")
frm_main.Text1.Text = Adodc1.Recordset.Fields("用户名")
frm_main.Show
Unload Me
Else
MsgBox "密码不正确,请您确认后重新输入"
Text1.Text = ""
Text1.SetFocus
If i > 2 Then
MsgBox "对不起,您已经3次利用错误的口令登录本系统,请您重新登录并且输入正确的口令!!", 64, "采购管理系统"
End
Else
i = i + 1
End If
End If
Else
MsgBox "对不起 没有此用户的信息"
Text2.Text = ""
Text1.Text = ""
End If
End If
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
Me.Left = (Screen.Width - Me.Width) / 2
Me.Top = (Screen.Height - Me.Height) / 2
Adodc1.RecordSource = "select * from Table_xxdl"
Adodc1.Refresh
If Adodc1.Recordset.RecordCount > 0 Then
ListView1.Enabled = True
ListView1.ListItems.Clear
Adodc1.Recordset.MoveFirst
Do While Adodc1.Recordset.EOF = False
key = Text3.Text
Set itmX = ListView1.ListItems.Add(, , key, 1)
Adodc1.Recordset.MoveNext
Loop
Else
ListView1.Enabled = False
End If
i = 1
End Sub
Private Sub ListView1_DblClick()
Text2.Text = ListView1.SelectedItem
Text1.SetFocus
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call Command1_Click
Else
End If
End Sub
Private Sub Text2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Text1.SetFocus
Else
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -