⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 修改密码.frm

📁 随着市场经济的发展
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 修改密码 
   Caption         =   "修改密码"
   ClientHeight    =   3165
   ClientLeft      =   5715
   ClientTop       =   4350
   ClientWidth     =   4830
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3165
   ScaleWidth      =   4830
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   525
      Left            =   2940
      TabIndex        =   7
      Top             =   2310
      Width           =   1005
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   2040
      TabIndex        =   6
      Top             =   1620
      Width           =   1695
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2040
      TabIndex        =   5
      Top             =   960
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2040
      TabIndex        =   4
      Top             =   360
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   840
      TabIndex        =   3
      Top             =   2340
      Width           =   975
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "确  认"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   2
      Top             =   1680
      Width           =   1095
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "新密码"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   1
      Top             =   1080
      Width           =   1095
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "原密码"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   600
      TabIndex        =   0
      Top             =   480
      Width           =   1095
   End
   Begin VB.Image Image1 
      Height          =   5955
      Left            =   0
      Picture         =   "修改密码.frx":0000
      Top             =   0
      Width           =   8925
   End
End
Attribute VB_Name = "修改密码"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim sql As String
    Dim cn As ADODB.Connection
    Dim rs As New ADODB.Recordset
    If Trim(Text2.Text) <> "" Then   '检查是否输入原密码,如没有输入,给出提示,否则核实此密码是否正确
           If denglujiemian.Text2.Text = Trim(Text1.Text) Then
                      If Text3.Text <> Text2.Text Then '密码不一致
                         MsgBox "密码不一致!"
                      End If
                      If checklenth(修改密码, "changpass") = True Then '密码一致,则检测密码长度是否符合要求
                         sql = "select * from yhxxb where yhm='" & Trim(denglujiemian.Text1.Text) & "'"
                         Set rs = exesql(sql)
                         rs.Fields("mm") = Trim(Text2.Text) '新密码写入数据库
                         rs.Update
                         Text1.Text = ""
                         Text2.Text = ""
                         Text3.Text = ""
                         Set rs = Nothing
                         Unload 修改密码
                         MsgBox "修改成功!"
                      Else: MsgBox ("密码长度超过限制!")
                         Text2.SetFocus
                      End If
                    Else:
                      Text1.Text = ""
                      Text2.Text = ""
                      Text3.Text = ""
                      MsgBox "原密码错误!"
            End If
    Else: MsgBox "请输入原密码!"
    End If
End Sub

Private Sub Command2_Click()
Unload 修改密码
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -