📄 frmuserpwd.frm
字号:
VERSION 5.00
Object = "{1666F204-B71B-4E6D-AA21-DCE71B94F422}#7.0#0"; "SmartXpButton.ocx"
Begin VB.Form frmuserpwd
BorderStyle = 0 'None
Caption = "用户修改密码"
ClientHeight = 4020
ClientLeft = 5595
ClientTop = 3555
ClientWidth = 4710
LinkTopic = "Form1"
ScaleHeight = 4020
ScaleWidth = 4710
ShowInTaskbar = 0 'False
Begin SmartXpButton.SmartNetXpButton Image2
Height = 375
Left = 2400
TabIndex = 8
Top = 3120
Width = 1215
_ExtentX = 2143
_ExtentY = 661
BackColor = 16711680
BackColorPop = 16711935
BackColorPush = 33023
CaptionAreaLayout= 1
Caption = "撤消(E)"
CaptionBackColor= 8454016
ShowCaption = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ShowPictureFixSize= -1 'True
End
Begin SmartXpButton.SmartNetXpButton Image1
Height = 375
Left = 720
TabIndex = 7
Top = 3120
Width = 1215
_ExtentX = 2143
_ExtentY = 661
BackColor = 16711680
BackColorPop = 16711935
BackColorPush = 33023
CaptionAreaLayout= 1
Caption = "确定(O)"
CaptionBackColor= 8454016
ShowCaption = -1 'True
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋体"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ShowPictureFixSize= -1 'True
End
Begin VB.TextBox Text3
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 6
Top = 2280
Width = 1695
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 5
Top = 1560
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
IMEMode = 3 'DISABLE
Left = 1920
PasswordChar = "*"
TabIndex = 4
Top = 720
Width = 1695
End
Begin VB.Image imgTitleMaximize
Height = 195
Left = 3360
Picture = "frmuserpwd.frx":0000
ToolTipText = "Maximize (Disabled)"
Top = 120
Visible = 0 'False
Width = 195
End
Begin VB.Image imgTitleHelp
Height = 210
Left = 3600
Picture = "frmuserpwd.frx":024A
Stretch = -1 'True
Top = 120
Width = 210
End
Begin VB.Image imgTitleMinimize
Height = 210
Left = 3960
Picture = "frmuserpwd.frx":0494
Stretch = -1 'True
Top = 120
Width = 210
End
Begin VB.Image imgTitleclose
Height = 195
Left = 4320
Picture = "frmuserpwd.frx":06DE
ToolTipText = "Close"
Top = 120
Width = 195
End
Begin VB.Image Imageicon
Height = 315
Left = 1440
Picture = "frmuserpwd.frx":0928
Stretch = -1 'True
Top = 120
Width = 315
End
Begin VB.Label lblTitle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "修改密码"
BeginProperty Font
Name = "Arial"
Size = 9.75
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 240
Left = 1800
TabIndex = 3
Top = 240
Width = 1020
End
Begin VB.Image imgWindowLeft
Height = 450
Left = 1080
Picture = "frmuserpwd.frx":25F2
Stretch = -1 'True
Top = 480
Width = 285
End
Begin VB.Image imgWindowRight
Height = 450
Left = 720
Picture = "frmuserpwd.frx":2D3C
Stretch = -1 'True
Top = 480
Width = 285
End
Begin VB.Image imgTitleLeft
Height = 450
Left = 0
Picture = "frmuserpwd.frx":3486
Top = 0
Width = 285
End
Begin VB.Image imgTitleRight
Height = 450
Left = 360
Picture = "frmuserpwd.frx":3BD0
Top = 0
Width = 285
End
Begin VB.Image imgWindowBottom
Height = 450
Left = 360
Picture = "frmuserpwd.frx":431A
Stretch = -1 'True
Top = 480
Width = 285
End
Begin VB.Image imgTitleMain
Height = 450
Left = 0
Picture = "frmuserpwd.frx":4A64
Stretch = -1 'True
Top = 450
Width = 285
End
Begin VB.Image imgWindowBottomLeft
Height = 450
Left = 720
Picture = "frmuserpwd.frx":51AE
Top = 0
Width = 285
End
Begin VB.Image imgWindowBottomRight
Height = 450
Left = 1080
Picture = "frmuserpwd.frx":58F8
Top = 0
Width = 285
End
Begin VB.Label Label3
BackStyle = 0 'Transparent
Caption = "确定密码"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 2
Top = 2400
Width = 1455
End
Begin VB.Label Label2
BackStyle = 0 'Transparent
Caption = "新密码(N)"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 240
TabIndex = 1
Top = 1560
Width = 1575
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "旧密码(P)"
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Index = 0
Left = 240
TabIndex = 0
Top = 720
Width = 1575
End
End
Attribute VB_Name = "frmuserpwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim mrc As ADODB.Recordset '用于记录集
Private Sub Form_Load()
MakeWindow Me
Dim sqlstr As String
Dim MsgText As String
txtSQL = "select * from user_if where Uname='" & user_name & "' "
Set mrc = MyDB.ExecuteSQL(txtSQL, MsgText)
Text1.Text = mrc.Fields(1)
End Sub
Private Sub Image1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
'看输入的密码是否正确
If Trim(Text2.Text) <> "" And Trim(Text3.Text) <> "" Then
If Trim(Text2.Text) <> Trim(Text3.Text) Then
MsgBox "密码输入不正确!请确认", vbOKOnly + vbExclamation, "警告"
Text2.SetFocus
Text2.Text = ""
Text3.Text = ""
Else
On Error Resume Next
mrc.Fields(1) = Text2.Text
mrc.Update
mrc.Close
MsgBox "密码修改成功!!", vbOKOnly + vbExclamation, "修改密码"
Unload Me
End If
Else
MsgBox "不能为空", vbInformation + vbOKOnly, "警告"
End If
End Sub
Private Sub Image2_Click()
Unload Me
End Sub
Private Sub imgTitleclose_Click()
intNumField = -2
Unload Me
End Sub
Private Sub imgTitleLeft_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
Private Sub imgTitleMain_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
Private Sub imgTitleMinimize_Click()
Me.WindowState = 1
End Sub
Private Sub imgTitleRight_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
Private Sub lblTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
DoDrag Me
End Sub
Private Sub text2_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text3.SetFocus
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -