📄 main_xtsz_klsz.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 main_xtsz_klsz
BorderStyle = 1 'Fixed Single
Caption = "系统设置--【口令设置】"
ClientHeight = 2235
ClientLeft = 45
ClientTop = 330
ClientWidth = 5265
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 2235
ScaleWidth = 5265
Begin VB.Frame Frame1
Height = 2115
Left = 60
TabIndex = 0
Top = 45
Width = 5160
Begin VB.CommandButton Command2
Caption = "取消"
Height = 360
Left = 1770
TabIndex = 7
Top = 1620
Width = 1530
End
Begin VB.TextBox Text2
Height = 330
Left = 1170
MaxLength = 6
TabIndex = 6
Top = 1095
Width = 3420
End
Begin VB.CommandButton Command3
Caption = "退出"
Height = 360
Left = 3315
TabIndex = 5
Top = 1620
Width = 1530
End
Begin VB.CommandButton Command1
Caption = "保存"
Height = 360
Left = 240
TabIndex = 4
Top = 1620
Width = 1530
End
Begin VB.TextBox Text1
Height = 330
Left = 1170
Locked = -1 'True
MaxLength = 6
TabIndex = 3
Top = 705
Width = 3420
End
Begin MSDataListLib.DataCombo DataCombo1
Bindings = "main_xtsz_klsz.frx":0000
Height = 330
Left = 1170
TabIndex = 2
Top = 300
Width = 3420
_ExtentX = 6033
_ExtentY = 582
_Version = 393216
ListField = "操作员名称"
Text = ""
End
Begin MSAdodcLib.Adodc Adodc1
Height = 330
Left = -1560
Top = 810
Visible = 0 'False
Width = 1905
_ExtentX = 3360
_ExtentY = 582
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=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=YYJXC;Initial Catalog=YYJXC"
OLEDBString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=YYJXC;Initial Catalog=YYJXC"
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = "select * from tb_power"
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
BackStyle = 0 'Transparent
Caption = "操作员 原密码 现密码"
Height = 990
Left = 510
TabIndex = 1
Top = 435
Width = 630
End
End
End
Attribute VB_Name = "main_xtsz_klsz"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'定义数据集对象
Dim rs1 As New ADODB.Recordset
Private Sub Form_Activate()
Text1.Text = ""
Text2.Text = ""
End Sub
Private Sub DataCombo1_Change()
rs1.Open "select * from tb_power where 操作员名称='" & DataCombo1.BoundText & "'", cnn, adOpenKeyset, adLockOptimistic
If rs1.RecordCount > 0 Then
Text1.Text = rs1.Fields("密码")
Else
Text1.Text = ""
End If
End Sub
Private Sub DataCombo1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then Text2.SetFocus
End Sub
Private Sub Command1_Click() '保存操作员信息
rs1.Open "select * from tb_power where 操作员名称='" & DataCombo1.BoundText & "'", cnn, adOpenKeyset, adLockOptimistic
If Text2.Text <> "" Then
rs1.Fields("密码") = Text2.Text
'更新数据库
rs1.Update
End If
rs1.Close
End Sub
Private Sub Command2_Click() '删除操作员信息
Text2.Text = ""
End Sub
Private Sub Command3_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -