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

📄 form1.frm

📁 婚姻介绍所管理信息系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmMdfPw 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改密码"
   ClientHeight    =   2610
   ClientLeft      =   5235
   ClientTop       =   4215
   ClientWidth     =   4530
   Icon            =   "Form1.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2610
   ScaleWidth      =   4530
   ShowInTaskbar   =   0   'False
   Begin MSAdodcLib.Adodc AdoMdfPw 
      Height          =   330
      Left            =   135
      Top             =   90
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      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.CommandButton Command3 
      Caption         =   "取消"
      Height          =   330
      Left            =   3285
      TabIndex        =   8
      Top             =   2160
      Width           =   870
   End
   Begin VB.CommandButton Command2 
      Caption         =   "应用"
      Height          =   330
      Left            =   1800
      TabIndex        =   7
      Top             =   2160
      Width           =   870
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   330
      Left            =   405
      TabIndex        =   6
      Top             =   2160
      Width           =   870
   End
   Begin VB.Frame Frame1 
      Height          =   2040
      Left            =   45
      TabIndex        =   0
      Top             =   0
      Width           =   4455
      Begin VB.TextBox Text1 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         PasswordChar    =   "*"
         TabIndex        =   9
         Top             =   360
         Width           =   2415
      End
      Begin VB.TextBox Text3 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   1350
         Width           =   2415
      End
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1395
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   855
         Width           =   2415
      End
      Begin VB.Label Label3 
         Caption         =   "确认密码"
         Height          =   195
         Left            =   540
         TabIndex        =   5
         Top             =   1440
         Width           =   735
      End
      Begin VB.Label Label2 
         Caption         =   "新密码"
         Height          =   195
         Left            =   540
         TabIndex        =   3
         Top             =   945
         Width           =   600
      End
      Begin VB.Label Label1 
         Caption         =   "原密码"
         Height          =   195
         Left            =   540
         TabIndex        =   1
         Top             =   450
         Width           =   600
      End
   End
End
Attribute VB_Name = "FrmMdfPw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If Text1.Text = curPassWord Then
        If Text2.Text = Text3.Text Then
            sqlStr = "select * from userdb where NAME='" & curUser & "'"
            AdoMdfPw.RecordSource = sqlStr
            'MsgBox sqlStr
            AdoMdfPw.Refresh
            AdoMdfPw.Recordset.Fields.Item(1).Value = Text2.Text
            AdoMdfPw.Recordset.Update
            MsgBox "修改成功!", vbOKOnly, "提示"
        Else
            MsgBox "两次输入的密码不同,请重新输入!", vbInformation, "警告"
        End If
    Else
        MsgBox "原密码不正确,请重新输入!", vbOKOnly, "警告"
    End If
    curPassWord = Text2.Text
    Unload Me
End Sub

Private Sub Command2_Click()
    If Text1.Text = curPassWord Then
        If Text2.Text = Text3.Text Then
            sqlStr = "select * from userdb where NAME='" & curUser & "'"
            AdoMdfPw.RecordSource = sqlStr
            'MsgBox sqlStr
            AdoMdfPw.Refresh
            AdoMdfPw.Recordset.Fields.Item(1).Value = Text2.Text
            AdoMdfPw.Recordset.Update
            MsgBox "修改成功!", vbOKOnly, "提示"
        Else
            MsgBox "两次输入的密码不同,请重新输入!", vbInformation, "警告"
        End If
    Else
        MsgBox "原密码不正确,请重新输入!", vbOKOnly, "警告"
    End If
    curPassWord = Text2.Text
End Sub

Private Sub Command3_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    AdoMdfPw.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\mgydb.mdb;Persist Security Info=False"
    AdoMdfPw.CommandType = adCmdText
End Sub

⌨️ 快捷键说明

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