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

📄 frmpassword.frm

📁 功能强大的个人工作通讯录
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPASSWORD 
   BackColor       =   &H00FFC0C0&
   Caption         =   "修改当前账户"
   ClientHeight    =   2985
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5955
   Icon            =   "frmPASSWORD.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   2985
   ScaleWidth      =   5955
   Begin VB.TextBox newLoginNO 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   1635
      TabIndex        =   10
      Top             =   1290
      Width           =   1935
   End
   Begin VB.CommandButton PasswordEdit 
      Caption         =   "修改"
      Height          =   1020
      Left            =   4035
      TabIndex        =   8
      Top             =   780
      Width           =   1290
   End
   Begin VB.TextBox Passwordconfirm 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1635
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   2220
      Width           =   1935
   End
   Begin VB.TextBox newPassword 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1635
      PasswordChar    =   "*"
      TabIndex        =   6
      Top             =   1740
      Width           =   1935
   End
   Begin VB.TextBox oldPassword 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      IMEMode         =   3  'DISABLE
      Left            =   1635
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   825
      Width           =   1935
   End
   Begin VB.TextBox oldLoginNO 
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   345
      Left            =   1635
      TabIndex        =   4
      Top             =   330
      Width           =   1935
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "新账户:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   645
      TabIndex        =   11
      Top             =   1350
      Width           =   840
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "注意密码不能小于4位"
      Height          =   180
      Left            =   3885
      TabIndex        =   9
      Top             =   2310
      Width           =   1710
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "确认密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   615
      TabIndex        =   3
      Top             =   2310
      Width           =   1050
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "新密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   645
      TabIndex        =   2
      Top             =   1800
      Width           =   840
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "旧密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   645
      TabIndex        =   1
      Top             =   885
      Width           =   840
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "旧账户:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   210
      Left            =   645
      TabIndex        =   0
      Top             =   390
      Width           =   840
   End
End
Attribute VB_Name = "frmPASSWORD"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Private Sub Form_Load()
Me.Height = 3495
Me.Width = 6075
Me.Top = Screen.Height / 2 - Me.Height / 2 - 400
Me.Left = Screen.Width / 2 - Me.Width / 2

oldLoginNO = LoginNO
newLoginNO = LoginNO

End Sub

Private Sub PasswordEdit_Click()

If Change(oldPassword) <> PassWord Then

     MsgBox "旧密码不正确,请确认后再尝试", vbOKOnly + 64, "提示"
    
    Exit Sub
    
End If


If Replace(newLoginNO, " ", "") = "" Then

    MsgBox "新账号不能为空,请确认后再尝试", vbOKOnly + 64, "提示"
    
    Exit Sub

End If


sql = "select * from 权限 where 账户='" & newLoginNO & "'"
Call OpenConn
rs.Open sql, cn, 3, 3
If rs.RecordCount > 0 And newLoginNO <> oldLoginNO Then
   MsgBox " 该账户名已经存在,请换另外一个账户名!", vbOKOnly + 64, "提示"
   Exit Sub
End If

If Len(newPassword) < 4 Or newPassword <> Passwordconfirm Then
    MsgBox "新密码不能为空或小于4位 或 密码确认与新密码不一致", vbOKOnly + 64, "提示"
    Exit Sub
End If

If MsgBox("你的修改的账户信息:" & Chr(13) & Chr(13) & "  账户名:" & newLoginNO & Chr(13) & Chr(13) & "  密码:" & newPassword & Chr(13) & Chr(13) & "是否确认修改?", vbYesNo + 64, "确认") = vbYes Then
   
   sql = "select * from 权限 where 账户='" & oldLoginNO & "'"
   
   Call OpenConn
   
   rs.Open sql, cn, 3, 3
   
   If rs.RecordCount > 0 Then
   
        rs.Fields("账户") = newLoginNO
       
        
        
         oldLoginNO.Text = newLoginNO
        LoginNO = newLoginNO
                
        rs.Fields("密码") = Change(newPassword)
        PassWord = Change(newPassword)
        
        rs.Update
         MsgBox "修改成功", vbOKOnly + 64, "提示"
         
         oldPassword.Text = ""
         newPassword.Text = ""
         Passwordconfirm = ""
         
   End If
   
   Call CloseConn
   
End If
End Sub

⌨️ 快捷键说明

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