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

📄 frmchange.frm

📁 此为我2001年为东莞建发楦头开发的企业管理软件他们使用至今,望斑竹指教! 其他会员最好不要随意下载,需经斑竹同意或我本人同意,谢谢!
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmchange 
   Caption         =   "更换密码"
   ClientHeight    =   2490
   ClientLeft      =   2415
   ClientTop       =   3015
   ClientWidth     =   5565
   Icon            =   "frmchange.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2490
   ScaleWidth      =   5565
   Begin VB.CommandButton cmdcancel 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4080
      TabIndex        =   8
      Top             =   960
      Width           =   1332
   End
   Begin VB.CommandButton cmdok 
      Caption         =   "确认"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   372
      Left            =   4080
      TabIndex        =   7
      Top             =   240
      Width           =   1332
   End
   Begin VB.Frame Frame1 
      Caption         =   "录入选项"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000C0&
      Height          =   2172
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3852
      Begin VB.TextBox Text3 
         Height          =   264
         Left            =   1560
         MaxLength       =   10
         TabIndex        =   6
         Top             =   1560
         Width           =   1692
      End
      Begin VB.TextBox Text2 
         Height          =   264
         Left            =   1560
         MaxLength       =   10
         TabIndex        =   5
         Top             =   960
         Width           =   1692
      End
      Begin VB.TextBox Text1 
         Enabled         =   0   'False
         Height          =   264
         IMEMode         =   3  'DISABLE
         Left            =   1560
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   360
         Width           =   1692
      End
      Begin VB.Label Label3 
         Caption         =   "确认新密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   120
         TabIndex        =   3
         Top             =   1560
         Width           =   1332
      End
      Begin VB.Label Label2 
         Caption         =   "新密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   372
         Left            =   480
         TabIndex        =   2
         Top             =   960
         Width           =   972
      End
      Begin VB.Label Label1 
         Caption         =   "旧密码:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   252
         Left            =   480
         TabIndex        =   1
         Top             =   360
         Width           =   1092
      End
   End
End
Attribute VB_Name = "frmchange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub cmdCancel_Click()
    Unload Me
End Sub

Private Sub cmdok_Click()
    If Text2.Text = "" Then
        MsgBox "新密码的值,不能为空!!!", vbCritical, "提示信息"
        Text2.SetFocus
        Exit Sub
    End If

    If Text3.Text = "" Then
        MsgBox "确认新密码的值,不能为空!!!", vbCritical, "提示信息"
        Text3.SetFocus
        Exit Sub
    End If

    If Text2.Text <> Text3.Text Then
        MsgBox "新密码与确认密码不正确,重新输入", vbCritical, "提示信息"
        Text2.SetFocus
        Exit Sub
    End If
    Dim sql
    sql = "update op set psd=" & "'" & Text2.Text & "'" & "where op=" & "'" & opvalue & "'" & " and " & " name=" & "'" & namevalue & "'"
    db.Execute sql
    MsgBox "更改密码成功,重新使用新密码!!!", vbInformation, "提示信息"
    Unload Me
End Sub

Private Sub Form_Activate()
    Text2.SetFocus
End Sub

Private Sub Form_Load()
    Text1.Text = Trim(passvalue)
End Sub

Private Sub Form_Resize()
'On Error Resume Next
'Me.Top = 0
'Me.Left = 50
End Sub

Private Sub Text1_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text2.SetFocus
End Sub

Private Sub Text2_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then Text3.SetFocus
End Sub

Private Sub Text3_KeyUp(KeyCode As Integer, Shift As Integer)
    If KeyCode = 13 Then cmdok.SetFocus
End Sub

⌨️ 快捷键说明

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