📄 frmpwd.frm
字号:
VERSION 5.00
Begin VB.Form frmpwd
BackColor = &H80000018&
Caption = "修改密码!!!"
ClientHeight = 2805
ClientLeft = 60
ClientTop = 450
ClientWidth = 4395
LinkTopic = "Form1"
MaxButton = 0 'False
ScaleHeight = 2805
ScaleWidth = 4395
StartUpPosition = 2 '屏幕中心
Begin VB.TextBox Text4
Height = 270
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 7
Top = 1560
Width = 2175
End
Begin VB.TextBox Text3
Height = 270
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 5
Top = 1200
Width = 2175
End
Begin VB.TextBox Text2
Height = 270
IMEMode = 3 'DISABLE
Left = 1560
PasswordChar = "*"
TabIndex = 3
Top = 720
Width = 2175
End
Begin VB.TextBox Text1
Appearance = 0 'Flat
BackColor = &H00FFFFFF&
Enabled = 0 'False
Height = 270
Left = 1560
TabIndex = 1
Top = 360
Width = 2175
End
Begin VB.Image Image2
Height = 330
Left = 3120
Picture = "frmpwd.frx":0000
Top = 2280
Width = 750
End
Begin VB.Image Image1
Height = 330
Left = 1800
Picture = "frmpwd.frx":0691
Top = 2280
Width = 750
End
Begin VB.Shape Shape2
BorderColor = &H8000000A&
Height = 615
Left = 1560
Shape = 4 'Rounded Rectangle
Top = 2160
Width = 2535
End
Begin VB.Shape Shape1
BackColor = &H8000000A&
BorderColor = &H8000000A&
Height = 1935
Left = 120
Top = 120
Width = 3975
End
Begin VB.Label Label4
BackColor = &H80000018&
Caption = "确认口令:"
Height = 255
Left = 600
TabIndex = 6
Top = 1560
Width = 975
End
Begin VB.Label Label3
BackColor = &H80000018&
Caption = "新口令:"
Height = 255
Left = 600
TabIndex = 4
Top = 1200
Width = 855
End
Begin VB.Label Label2
BackColor = &H80000018&
Caption = "旧口令:"
Height = 255
Left = 600
TabIndex = 2
Top = 720
Width = 975
End
Begin VB.Label Label1
BackColor = &H80000018&
Caption = "用户名:"
Height = 255
Left = 600
TabIndex = 0
Top = 360
Width = 735
End
End
Attribute VB_Name = "frmpwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Text1.Text = frmlogin.Text1.Text
End Sub
Private Sub Image1_Click()
On Error Resume Next
Call zdf
rs.Open "select * from user where user='" & Text1.Text & "'"
If IsNull(rs.Fields(2).Value) Then
If Trim(Text3.Text) = "" Then
MsgBox "东信手机提醒你,新口令不能为空", vbCritical, "东信手机售后服务系统!!!"
Text3.SetFocus
Exit Sub
End If
If Trim(Text4.Text) = "" Then
MsgBox "东信手机提醒你,确认口令不能为空", vbCritical, "东信手机售后服务系统!!!"
Text4.SetFocus
Exit Sub
End If
If Trim(Text3.Text) <> Trim(Text4.Text) Then
MsgBox "东信手机提醒你,新口令和确认口令不相同!!!", vbCritical, "东信手机售后服务系统!!!"
Text3.Text = ""
Text4.Text = ""
Text3.SetFocus
Exit Sub
End If
If Len(Text3.Text) < 6 Then
MsgBox "东信手机提醒你,为了安全性,请输入大于六位的密码!!!", vbCritical, "东信手机售后服务系统!!!"
Exit Sub
Else
conn.Execute "update user set pwd='" & Trim(Text3.Text) & "' where user='" & Trim(Text1.Text) & "'"
MsgBox "东信手机提醒你,口令修改成功!!!", vbOKOnly, "东信手机售后服务系统!!!"
End If
End If
If Not IsNull(rs.Fields(2).Value) Then
If Trim(Text2.Text) = "" Then
MsgBox "东信手机提醒你,旧口令不能为空", vbCritical, "东信手机售后服务系统!!!"
Text2.SetFocus
Exit Sub
End If
If Trim(Text3.Text) = "" Then
MsgBox "东信手机提醒你,新口令不能为空", vbCritical, "东信手机售后服务系统!!!"
Text3.SetFocus
Exit Sub
End If
If Trim(Text4.Text) = "" Then
MsgBox "东信手机提醒你,确认口令不能为空", vbCritical, "东信手机售后服务系统!!!"
Text4.SetFocus
Exit Sub
End If
If Trim(Text3.Text) <> Trim(Text4.Text) Then
MsgBox "东信手机提醒你,新口令和确认口令不相同!!!", vbCritical, "东信手机售后服务系统!!!"
Text3.Text = ""
Text4.Text = ""
Text3.SetFocus
Exit Sub
End If
If Len(Text3.Text) < 6 Then
MsgBox "东信手机提醒你,为了安全性,请输入大于六位的密码!!!", vbCritical, "东信手机售后服务系统!!!"
Text3.Text = ""
Text4.Text = ""
Text3.SetFocus
Exit Sub
End If
If Trim(Text2.Text) <> Trim(rs.Fields(2).Value) Then
MsgBox "东信手机提醒你,旧口令不正确!!!", vbCritical, "东信手机售后服务系统!!!"
Text2.SetFocus
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
Exit Sub
Else
conn.Execute "update user set pwd='" & Trim(Text3.Text) & "' where user='" & Trim(Text1.Text) & "'"
MsgBox "东信手机提醒你,口令修改成功!!!", vbOKOnly, "东信手机售后服务系统!!!"
End If
End If
End Sub
Private Sub Image2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -