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

📄 修改密码.frm

📁 图书馆管理系统的实现
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{B0091D05-CC1B-4896-A94A-29B75E80ABE9}#5.0#0"; "XpControls.ocx"
Begin VB.Form frmXiuGaiMiMa 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "                  修 改 密 码"
   ClientHeight    =   1995
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3540
   Icon            =   "修改密码.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   ScaleHeight     =   1995
   ScaleWidth      =   3540
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   2160
      Top             =   0
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Bookdate;Data Source=127.0.0.1"
      OLEDBString     =   "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=Bookdate;Data Source=127.0.0.1"
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   "sa"
      Password        =   ""
      RecordSource    =   "Manage_User"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Frame Frame1 
      Caption         =   "修改密码"
      Height          =   1815
      Left            =   120
      TabIndex        =   0
      Top             =   100
      Width           =   3340
      Begin dlocx.xpcmdbutton Command3 
         Height          =   255
         Left            =   2520
         TabIndex        =   6
         Top             =   1320
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   450
         Caption         =   "取消"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin dlocx.xpcmdbutton Command2 
         Height          =   255
         Left            =   2520
         TabIndex        =   5
         Top             =   840
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   450
         Caption         =   "重输"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin dlocx.xpcmdbutton Command1 
         Height          =   255
         Left            =   2520
         TabIndex        =   4
         Top             =   360
         Width           =   615
         _ExtentX        =   1085
         _ExtentY        =   450
         Caption         =   "确认"
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "宋体"
            Size            =   9
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.TextBox TxtOldPass 
         Appearance      =   0  'Flat
         ForeColor       =   &H000080FF&
         Height          =   270
         Left            =   1320
         TabIndex        =   1
         Top             =   315
         Width           =   975
      End
      Begin VB.Frame Frame2 
         Caption         =   "修改:"
         Height          =   975
         Left            =   120
         TabIndex        =   8
         Top             =   720
         Width           =   2295
         Begin VB.TextBox TxtOk 
            Appearance      =   0  'Flat
            ForeColor       =   &H000080FF&
            Height          =   270
            IMEMode         =   3  'DISABLE
            Left            =   1200
            PasswordChar    =   "*"
            TabIndex        =   3
            Top             =   600
            Width           =   975
         End
         Begin VB.TextBox TxtPass 
            Appearance      =   0  'Flat
            ForeColor       =   &H000080FF&
            Height          =   270
            Left            =   1200
            TabIndex        =   2
            Top             =   240
            Width           =   975
         End
         Begin VB.Label Label3 
            AutoSize        =   -1  'True
            Caption         =   "确  认:"
            Height          =   180
            Left            =   480
            TabIndex        =   10
            Top             =   645
            Width           =   720
         End
         Begin VB.Label Label2 
            AutoSize        =   -1  'True
            Caption         =   "新密码:"
            Height          =   180
            Left            =   480
            TabIndex        =   9
            Top             =   300
            Width           =   720
         End
      End
      Begin VB.Label Label1 
         AutoSize        =   -1  'True
         Caption         =   "旧密码:"
         Height          =   180
         Left            =   600
         TabIndex        =   7
         Top             =   360
         Width           =   720
      End
   End
End
Attribute VB_Name = "frmXiuGaiMiMa"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If TxtOldPass = "" Then
        MsgBox "请填写您的旧密码", vbOKOnly + vbInformation, "密码修改"
        Command2_Click
        TxtOldPass.SetFocus
    ElseIf TxtPass = "" Or TxtOk = "" Then
        MsgBox "请填写完整", vbOKOnly + vbInformation, "修改密码"
        Command2_Click
        TxtOldPass.SetFocus
        ElseIf TxtOldPass = pass Then
                If TxtPass = TxtOk Then
                    Adodc1.CommandType = adCmdText
                    Adodc1.RecordSource = "select * from Manage_User where username='" + user + "'"
                    Adodc1.Refresh
                    Adodc1.Recordset.Update "password", TxtPass
                    Adodc1.Refresh
                    frmXiuGaiMiMa.Hide
                    pass = TxtPass
                    MsgBox "密码修改成功", vbOKOnly, "修改密码"
                    Dim name$
                    name = Adodc1.Recordset.Fields("emp_name")
                    Adodc1.CommandType = adCmdText
                    Adodc1.RecordSource = "select * from employee where emp_name='" + name + "'"
                    Adodc1.Refresh
                    Adodc1.Recordset.Update "emp_pass", pass

                End If
            Else
                MsgBox "您的旧密码不正确", vbOKOnly + vbExclamation, "错误"
                Command2_Click
                TxtOldPass.SetFocus
            End If
End Sub

Private Sub Command2_Click()
    TxtOldPass.Text = ""
    TxtPass.Text = ""
    TxtOk.Text = ""
End Sub

Private Sub Command3_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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