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

📄 upkey.frm

📁 实现画图
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Upkey 
   Caption         =   "修改密码"
   ClientHeight    =   5565
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   6675
   LinkTopic       =   "Form5"
   ScaleHeight     =   5565
   ScaleWidth      =   6675
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text3 
      Height          =   495
      Left            =   2760
      TabIndex        =   7
      Top             =   960
      Width           =   1815
   End
   Begin VB.Data Data1 
      Caption         =   "Data1"
      Connect         =   "Access 2000;"
      DatabaseName    =   "C:\Documents and Settings\Administrator\桌面\11.mdb"
      DefaultCursorType=   0  '缺省游标
      DefaultType     =   2  '使用 ODBC
      Exclusive       =   0   'False
      Height          =   495
      Left            =   240
      Options         =   0
      ReadOnly        =   0   'False
      RecordsetType   =   1  'Dynaset
      RecordSource    =   "UserTable"
      Top             =   4560
      Visible         =   0   'False
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   495
      Left            =   2520
      TabIndex        =   5
      Top             =   3720
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   495
      Left            =   360
      TabIndex        =   4
      Top             =   3720
      Width           =   1215
   End
   Begin VB.TextBox Text2 
      Height          =   615
      IMEMode         =   3  'DISABLE
      Left            =   2760
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   2760
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   615
      IMEMode         =   3  'DISABLE
      Left            =   2760
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1920
      Width           =   1815
   End
   Begin VB.Label Label3 
      Caption         =   "请输入原始密码"
      Height          =   495
      Left            =   360
      TabIndex        =   6
      Top             =   840
      Width           =   1815
   End
   Begin VB.Label Label2 
      Caption         =   "请确认新密码"
      Height          =   495
      Left            =   240
      TabIndex        =   1
      Top             =   2760
      Width           =   1935
   End
   Begin VB.Label Label1 
      Caption         =   "请输入新密码"
      Height          =   495
      Left            =   360
      TabIndex        =   0
      Top             =   1800
      Width           =   1815
   End
End
Attribute VB_Name = "Upkey"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    
      If Text3.Text = "" Then
        MsgBox "请输入原始密码!", vbOKOnly + vbExclamation, "警告 "
        Text3.SetFocus
       Else
         If UserName = Trim(Data1.Recordset.Fields(0)) Then
           If Trim(Text3.Text) = Trim(Data1.Recordset.Fields(1)) Then
               Data1.Recordset.Edit
               Data1.Recordset.Fields(1) = Text2.Text
               Data1.Recordset.Update
               Me.Hide
               MsgBox "修改密码成功!", vbOKOnly + vbExclamation, "修改密码"
            Else
                MsgBox "用户密码错误,请确认!", vbOKOnly + vbExclamation, "警告 "
                Me.Text3.SetFocus
                Me.Text1.Text = ""
                Me.Text2.Text = ""
                Me.Text1.Text = ""
              End If
         End If
    End If
                              
    
        
          

End Sub

Private Sub Command2_Click()
Me.Text3.SetFocus
Me.Text1.Text = ""
Me.Text2.Text = ""
Me.Text1.Text = ""
End Sub
Private Sub Form_Load()
Me.Data1.DatabaseName = App.Path + "\11.mdb"
Me.Data1.RecordSource = "UserTable"
End Sub


⌨️ 快捷键说明

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