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

📄 frmchangepwd.frm

📁 本系统是北京神兵广告有限公司的广告系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmchangepwd 
   Caption         =   "神兵国际广告(北京)有限公司广告系统"
   ClientHeight    =   7200
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   9585
   LinkTopic       =   "Form1"
   ScaleHeight     =   7200
   ScaleWidth      =   9585
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   615
      Left            =   4680
      TabIndex        =   4
      Top             =   4440
      Width           =   1575
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   615
      Left            =   2760
      TabIndex        =   3
      Top             =   4440
      Width           =   1455
   End
   Begin VB.TextBox Text3 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   4320
      MaxLength       =   12
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   3720
      Width           =   1935
   End
   Begin VB.TextBox Text2 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   4320
      MaxLength       =   12
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   3120
      Width           =   1935
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   4320
      MaxLength       =   12
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   2640
      Width           =   1935
   End
   Begin VB.Label Label4 
      Alignment       =   2  'Center
      BackColor       =   &H00FF8080&
      BorderStyle     =   1  'Fixed Single
      Caption         =   "  修 改 密 码"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FFFFFF&
      Height          =   375
      Left            =   0
      TabIndex        =   8
      Top             =   0
      Width           =   9615
   End
   Begin VB.Label Label3 
      Caption         =   "确认新密码:"
      Height          =   255
      Left            =   2760
      TabIndex        =   7
      Top             =   3720
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "  新 密 码:"
      Height          =   255
      Left            =   2760
      TabIndex        =   6
      Top             =   3120
      Width           =   1095
   End
   Begin VB.Label Label1 
      Caption         =   "  原 密 码:"
      Height          =   255
      Left            =   2760
      TabIndex        =   5
      Top             =   2640
      Width           =   1095
   End
End
Attribute VB_Name = "frmchangepwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    If Text1.Text = "" Then
    msg = MsgBox("请输入您现在的密码", 16, "出错拉!")
    Text1.SetFocus
    Exit Sub
    End If
    If Text2.Text = "" Then
    msg = MsgBox("请输入新密码", 16, "出错拉!")
    Text2.SetFocus
    Exit Sub
    End If
    If Text3.Text = "" Then
    msg = MsgBox("请重复输入新密码", 16, "出错拉!")
    Text3.SetFocus
    Exit Sub
    End If
    If Text3.Text <> Text2.Text Then
    msg = MsgBox("2次输入的密码不相同请重新输入", 16, "出错拉!")
    Text2.SetFocus
    Text2.Text = ""
    Text3.Text = ""
    Exit Sub
    End If
        Dim sql As String
        Dim str As String
        Dim con As ADODB.Connection
        Set con = New Connection
        str = "provider=microsoft.jet.oledb.4.0;Data Source=" & App.Path & "\database.mdb"
        con.Open str
Dim rs As ADODB.Recordset
Set rs = New Recordset
sql = "select * from userlogin where id=" & frmLogin.id & " and password='" & Text1.Text & "'"
rs.Open sql, con, 3, 2
If rs.EOF Then
msg = MsgBox("您输入的原密码不正确", 16, "出错拉")
Text1.SetFocus
Text1.Text = ""
Else
rs!password = Trim(Text2.Text)
rs.Update
msg = MsgBox("您的密码已经修改成功,新的密码是" & Trim(Text2.Text) & "请记住哦!", 64, "修改成功拉")
Unload Me
frmmain.Show
End If


End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Unload(Cancel As Integer)
frmmain.Show

End Sub

⌨️ 快捷键说明

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