📄 frmpassword.frm
字号:
VERSION 5.00
Object = "{BA513CF3-1BFD-4976-B2DA-2F1A208D11F9}#1.0#0"; "vkusercontrolsxp.ocx"
Begin VB.Form frmPassword
Caption = "密码修改"
ClientHeight = 1950
ClientLeft = 60
ClientTop = 420
ClientWidth = 4770
BeginProperty Font
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Icon = "frmPassword.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1950
ScaleWidth = 4770
StartUpPosition = 2 '屏幕中心
Begin vkUserContolsXP.vkTextBox vkTextBox3
Height = 330
Left = 1920
TabIndex = 3
Top = 840
Width = 2055
_ExtentX = 3625
_ExtentY = 582
BeginProperty LegendFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
PassWordChar = "*"
ScrollBars = 0
LegendForeColor = 16639672
End
Begin vkUserContolsXP.vkTextBox vkTextBox2
Height = 330
Left = 1920
TabIndex = 2
Top = 480
Width = 2055
_ExtentX = 3625
_ExtentY = 582
BeginProperty LegendFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
PassWordChar = "*"
ScrollBars = 0
LegendForeColor = 16639672
End
Begin vkUserContolsXP.vkCommand vkCommand2
Height = 375
Left = 2760
TabIndex = 5
Top = 1440
Width = 1455
_ExtentX = 2566
_ExtentY = 661
BackColorPushed1= 16514043
BackColorPushed2= 14474460
Caption = "关闭"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmPassword.frx":038A
End
Begin vkUserContolsXP.vkCommand vkCommand1
Height = 375
Left = 840
TabIndex = 4
Top = 1440
Width = 1335
_ExtentX = 2355
_ExtentY = 661
BackColorPushed1= 16514043
BackColorPushed2= 14474460
Caption = "确认"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Picture = "frmPassword.frx":0724
End
Begin vkUserContolsXP.vkTextBox vkTextBox1
Height = 330
Left = 1920
TabIndex = 1
Top = 120
Width = 2055
_ExtentX = 3625
_ExtentY = 582
BeginProperty LegendFont {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Arial"
Size = 9
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
PassWordChar = "*"
ScrollBars = 0
LegendForeColor = 16639672
End
Begin VB.Image Image3
Height = 240
Left = 720
Picture = "frmPassword.frx":0ABE
Top = 840
Width = 240
End
Begin VB.Image Image2
Height = 240
Left = 720
Picture = "frmPassword.frx":0E48
Top = 480
Width = 240
End
Begin VB.Image Image1
Height = 240
Left = 720
Picture = "frmPassword.frx":11D2
Top = 120
Width = 240
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "密码确认"
Height = 225
Left = 1080
TabIndex = 7
Top = 840
Width = 720
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "新密码"
Height = 225
Left = 1080
TabIndex = 6
Top = 480
Width = 540
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "原密码"
Height = 225
Left = 1080
TabIndex = 0
Top = 120
Width = 540
End
End
Attribute VB_Name = "frmPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub vkCommand1_Click()
On Error GoTo ErrFlag
Dim ConnTemp As New ADODB.Connection
Dim StrErr As String
Dim strSQL As String
StrErr = ""
If InStr(vkTextBox1.Text, MyAppInfo.UserPW) > 0 And InStr(MyAppInfo.UserPW, vkTextBox1.Text) > 0 Then
If vkTextBox2.Text <> vkTextBox3.Text Then
StrErr = "两次输入的新密码不一致"
End If
Else
StrErr = "原密码错误,请确认"
End If
If StrErr = "" Then
strSQL = "Update userlist set [Password]='" & vkTextBox2.Text & "' Where UserName='" & MyAppInfo.UserName & "'"
ConnTemp.Open StrConn
ConnTemp.Execute strSQL
ConnTemp.Close
MsgBox "密码变更成功, 请记住新密码", vbOKOnly + vbInformation
Else
MsgBox StrErr, vbOKOnly + vbCritical
End If
Set ConnTemp = Nothing
Exit Sub
ErrFlag:
MsgBox "[变更密码]" & Err.Description, vbOKOnly + vbCritical
End Sub
Private Sub vkCommand2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -