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

📄 用户口令修改.frm

📁 VB版的毕业设计作品
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form19 
   Caption         =   "用户口令修改"
   ClientHeight    =   3540
   ClientLeft      =   5130
   ClientTop       =   3360
   ClientWidth     =   5355
   Icon            =   "用户口令修改.frx":0000
   LinkTopic       =   "Form19"
   Picture         =   "用户口令修改.frx":08CA
   ScaleHeight     =   3540
   ScaleWidth      =   5355
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access"
      DatabaseName    =   ""
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   345
      Left            =   720
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   ""
      Top             =   2400
      Visible         =   0   'False
      Width           =   2175
   End
   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          =   375
      Left            =   3000
      TabIndex        =   9
      Top             =   2760
      Width           =   975
   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          =   375
      Left            =   1320
      TabIndex        =   8
      Top             =   2760
      Width           =   975
   End
   Begin VB.TextBox Text3 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   2640
      MaxLength       =   8
      PasswordChar    =   "*"
      TabIndex        =   7
      Top             =   2040
      Width           =   1815
   End
   Begin VB.TextBox Text2 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   2640
      MaxLength       =   8
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1440
      Width           =   1815
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   2640
      MaxLength       =   8
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   840
      Width           =   1815
   End
   Begin VB.Label Label5 
      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          =   255
      Left            =   1200
      TabIndex        =   6
      Top             =   2040
      Width           =   1455
   End
   Begin VB.Label Label4 
      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          =   255
      Left            =   1200
      TabIndex        =   4
      Top             =   1440
      Width           =   975
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Height          =   255
      Left            =   2760
      TabIndex        =   2
      Top             =   240
      Width           =   1695
   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          =   255
      Left            =   1200
      TabIndex        =   1
      Top             =   840
      Width           =   975
   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          =   255
      Left            =   1200
      TabIndex        =   0
      Top             =   240
      Width           =   1215
   End
End
Attribute VB_Name = "Form19"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Download by http://www.codefans.net
Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Data1.DatabaseName = App.Path + "\db.mdb"
Data1.RecordSource = "用户管理"
Me.Height = 3945
Me.Width = 5475
End Sub


Private Sub Command1_Click()
If Text1.Text = "" And Text2.Text = "" And Text3.Text = "" Then
   MsgBox "你没有输入更新信息!"
   Else
      If Text1.Text = "" Then
         MsgBox "请输入原密码!"
         Else
            If Text2.Text = "" Then
               MsgBox "你没有输入新密码!"
               Else
                  If Text3.Text = "" Then
                     MsgBox "请确认你的新密码!"
                     Else
                        If Text2.Text <> Text3.Text Then
                           MsgBox "你两次输入的密码不同,请重新输入新密码!"
                           Text2.Text = ""
                           Text3.Text = ""
                           Text2.SetFocus
                           Else
                           Dim password As String
                           password = "密码=" & "'" & Trim(Text1.Text) & "'"
                           Data1.Recordset.FindFirst password
                               If Data1.Recordset.NoMatch Then
                                  MsgBox "你输入的原密码有误!"
                                  Else
                                  Data1.Recordset.AddNew
                                  Data1.Recordset.Fields("用户名") = Label3.Caption
                                  Data1.Recordset.Fields("用户编号") = Label3.Caption
                                  Data1.Recordset.Fields("密码") = Text2.Text
                                  Data1.Recordset.Update
                                  Data1.Recordset.Delete
                                  MsgBox "你已经成功的更换了新密码,请使用新密码!"
                               End If
                        End If
                   End If
            End If
        End If
End If
End Sub

⌨️ 快捷键说明

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