📄 frmpassamend.frm
字号:
VERSION 5.00
Object = "{E95A2510-F3D1-416D-823B-4F840FE98091}#3.0#0"; "Command.ocx"
Begin VB.Form frmPassAmend
BorderStyle = 1 'Fixed Single
Caption = "当前用户密码修改"
ClientHeight = 4665
ClientLeft = 45
ClientTop = 330
ClientWidth = 4980
Icon = "frmPassAmend.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 4665
ScaleWidth = 4980
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox txtPassNAm
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 3
Top = 3240
Width = 2415
End
Begin VB.TextBox txtOperPassNew
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 2
Top = 2520
Width = 2415
End
Begin VB.TextBox txtOperName
Height = 375
Left = 1920
Locked = -1 'True
TabIndex = 1
Top = 1800
Width = 2415
End
Begin VB.TextBox txtOperID
Height = 375
Left = 1920
Locked = -1 'True
TabIndex = 0
Top = 1080
Width = 2415
End
Begin CSCommand.Command cmdExit
Height = 600
Left = 2040
TabIndex = 9
Top = 3840
Width = 1050
_ExtentX = 1852
_ExtentY = 1058
PICMaskColor = 16711680
Icon = "frmPassAmend.frx":030A
Caption = "退出"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 32768
DisabledFontColor= 32768
ShowFocus = 0 'False
Appearance = 2
BackStyle = 0
End
Begin CSCommand.Command cmdSave
Height = 600
Left = 360
TabIndex = 10
Top = 3840
Width = 1035
_ExtentX = 1826
_ExtentY = 1058
PICMaskColor = 16711680
Icon = "frmPassAmend.frx":075C
Caption = "保存"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 32768
DisabledFontColor= 32768
ShowFocus = 0 'False
Appearance = 2
BackStyle = 0
End
Begin CSCommand.Command cmdReEnter
Height = 600
Left = 3600
TabIndex = 11
Top = 3840
Width = 1050
_ExtentX = 1852
_ExtentY = 1058
PICMaskColor = 16711680
Icon = "frmPassAmend.frx":1436
Caption = "登陆"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 10.5
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
FontColor = 32768
DisabledFontColor= 32768
ShowFocus = 0 'False
Appearance = 2
BackStyle = 0
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "修改用户密码"
BeginProperty Font
Name = "华文彩云"
Size = 18
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000001&
Height = 360
Left = 1440
TabIndex = 8
Top = 360
Width = 2250
End
Begin VB.Label Label4
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "密 码 确 认:"
Height = 180
Left = 480
TabIndex = 7
Top = 3360
Width = 1170
End
Begin VB.Label Label3
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "输入新密码 :"
Height = 180
Left = 360
TabIndex = 6
Top = 2640
Width = 1410
End
Begin VB.Label Label2
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "用 户 姓 名:"
Height = 180
Left = 360
TabIndex = 5
Top = 1920
Width = 1410
End
Begin VB.Label Label1
Alignment = 2 'Center
AutoSize = -1 'True
Caption = "用 户 I D :"
Height = 180
Left = 360
TabIndex = 4
Top = 1200
Width = 1440
End
End
Attribute VB_Name = "frmPassAmend"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rscLibOper As ADODB.Recordset
Dim strSQLPiD As String
Dim cnmdOperUp As ADODB.Command
Dim CnnUp As ADODB.Connection
Private Sub cmdCancel_Click()
On Error Resume Next
rscLibOper.Close
Unload frmPassAmend
End Sub
Private Sub cmdExit_Click()
Unload Me
End Sub
Private Sub cmdReEnter_Click()
Unload Me
Unload main
login.Show
End Sub
Private Sub cmdSave_Click()
Dim strCnmd As String
Dim strTxtpassN As String
Set cnmdOperUp = New ADODB.Command
Set cnmdOperUp.ActiveConnection = cnn.c
'strCnmd = "update operator set password='" & strTxtpassN & "' where operid='" & strSQLPiD & "';"
If txtOperPassNew.Text = txtPassNAm.Text Then
'strTxtpassN = txtPassNAm.Text
strTxtpassN = passEncrypt_Decrypt(txtPassNAm.Text)
'rscLibOper!Password = strTxtpassN
strCnmd = "update operator set password='" & strTxtpassN & "' where operid='" & strSQLPiD & "';"
cnmdOperUp.CommandText = strCnmd
cnmdOperUp.Execute
MsgBox "密码已成功更新", 48, "系统提示"
Else
MsgBox "密码检验有误," & Chr(13) & "请重新输入密码。", 48, "系统提示"
txtOperPassNew.Text = ""
txtPassNAm.Text = ""
txtOperPassNew.SetFocus
End If
End Sub
Private Sub Form_Activate()
txtOperPassNew.SetFocus
End Sub
Private Sub Form_Load()
strSQLPiD = operatorid
'Set CnnUp = New ADODB.Connection
'CnnUp.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=Library;Data Source=" & ServerName
'CnnUp.Open
Set rscLibOper = New ADODB.Recordset
rscLibOper.Open "select operid,opername,password from operator where operid='" & strSQLPiD & "'" _
, cnn.c, adOpenStatic, adLockPessimistic, adCmdText
txtOperID.Text = rscLibOper!operid
txtOperName.Text = rscLibOper!opername
End Sub
'Private Sub Form_Unload(Cancel As Integer)
' rscLibOper.Close
' CnnUp.Close
' Set CnnUp = Nothing
'
'End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -