frmpassword.frm

来自「水电费收费管理系统」· FRM 代码 · 共 190 行

FRM
190
字号
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form frmpassword 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改密码"
   ClientHeight    =   1770
   ClientLeft      =   2760
   ClientTop       =   3750
   ClientWidth     =   5895
   Icon            =   "frmpassword.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1770
   ScaleWidth      =   5895
   ShowInTaskbar   =   0   'False
   Begin VB.TextBox Text3 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1080
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1200
      Width           =   3015
   End
   Begin VB.TextBox Text2 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1080
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   720
      Width           =   3015
   End
   Begin VB.TextBox Text1 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1080
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   240
      Width           =   3015
   End
   Begin VB.CommandButton command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   4560
      TabIndex        =   1
      Top             =   600
      Width           =   1215
   End
   Begin VB.CommandButton command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   4560
      TabIndex        =   0
      Top             =   120
      Width           =   1215
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   2640
      Top             =   240
      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.Label Label3 
      Caption         =   "验证密码:"
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   1320
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "新密码:"
      Height          =   255
      Left            =   360
      TabIndex        =   6
      Top             =   840
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "旧密码:"
      Height          =   255
      Left            =   360
      TabIndex        =   5
      Top             =   360
      Width           =   735
   End
End
Attribute VB_Name = "frmpassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As New ADODB.Recordset
Option Explicit


Private Sub Command1_Click()

Dim STR As String
    If UCase(Trim(Text1.Text)) <> UCase(Trim(a)) Then
      MsgBox "旧密码不对", , "更改密码"
      Text1.SetFocus
      Text1.SelStart = 0
      Text1.SelLength = Len(Text1.Text)
      Exit Sub
    End If
    
    If UCase(Trim(Text2.Text)) <> UCase(Trim(Text3.Text)) Then
      MsgBox "新密码校验不对,请重新校验新密码", , "更改密码"
      Text3.Text = ""
      Text2.SetFocus
      Text2.SelStart = 0
      Text2.SelLength = Len(Text2.Text)
      Exit Sub
    End If
     
    If MsgBox("将要改成新密码,确定吗?", vbYesNo, "更改密码") = vbYes Then
     Adodc1.Recordset.Bookmark = bookmarklogin
    
  'If Text3.Text = "" Then
   'Clear Adodc1.Recordset.Fields("password")
  'End If
     Adodc1.Recordset.Fields("password") = Text3.Text
    
     Adodc1.Recordset.Update
     Adodc1.Refresh
        MsgBox "密码更改完毕", , "更改密码"
    End If
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Form_Load()
 
Adodc1.ConnectionString = config.cnZdx.ConnectionString
    Adodc1.RecordSource = "SELECT*FROM login"
    Adodc1.Refresh

End Sub

Private Sub OKButton_Click()

End Sub

⌨️ 快捷键说明

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