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

📄 frm_password.frm

📁 家庭或个人最好的管理小型软件
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frm_password 
   Caption         =   "修改密码"
   ClientHeight    =   3405
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4185
   Icon            =   "frm_password.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3405
   ScaleWidth      =   4185
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2520
      TabIndex        =   7
      Top             =   2640
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   840
      TabIndex        =   6
      Top             =   2640
      Width           =   855
   End
   Begin VB.TextBox Text3 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1800
      Width           =   1455
   End
   Begin VB.TextBox Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1080
      Width           =   1455
   End
   Begin VB.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   2040
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   360
      Width           =   1455
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "再输入一遍:"
      Height          =   375
      Left            =   480
      TabIndex        =   2
      Top             =   1920
      Width           =   1215
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "新密码:"
      Height          =   375
      Left            =   840
      TabIndex        =   1
      Top             =   1200
      Width           =   855
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "旧密码:"
      Height          =   375
      Left            =   840
      TabIndex        =   0
      Top             =   480
      Width           =   975
   End
End
Attribute VB_Name = "frm_password"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Mydb As New ADODB.Recordset
Dim Str_text As String
Private Sub Command1_Click()
            On Error Resume Next
            Dim Password As String
            Dim Newpassword As String
            
            Password = Text1.Text
            Newpassword = Text2.Text
            
            Set Mydb = ExeCutesql("SELECT pass from user1 WHERE user='" & Cname & "'", Str_text)
            'MsgBox "select pass from user1 where user='" & Cname & "'"
            
            If Not Password = Mydb.Fields(0) Then
                  MsgBox "原密码输入错误!", vbOKOnly + 32, "注意"
                  Text2.Text = ""
                  Text3.Text = ""
                  Text2.SetFocus
            Else
               If Text3.Text <> Newpassword Then
                  MsgBox "你两次输入密码不一致,请重新输入!", vbOKOnly + 32, "注意"
                  Text1.SetFocus
               Else
                  ExeCutesql "UPDATE user1 SET pass= '" & Newpassword & "' where user='" & Cname & "'", ""
                  MsgBox "密码更改成功!", vbOKOnly + 64, "注意"
                  Unload Me
               End If
            End If
End Sub
Private Sub Command2_Click()
            Unload Me
            frm_main.Show
End Sub

⌨️ 快捷键说明

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