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

📄 frmmodipassword.frm

📁 一个关于进销存的源代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmmodipassword 
   BackColor       =   &H00FF8080&
   Caption         =   "修改密码"
   ClientHeight    =   2520
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   4530
   Icon            =   "frmmodipassword.frx":0000
   LinkTopic       =   "Form1"
   MDIChild        =   -1  'True
   ScaleHeight     =   2520
   ScaleWidth      =   4530
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   3360
      Picture         =   "frmmodipassword.frx":030A
      TabIndex        =   5
      Top             =   1440
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确认"
      Height          =   375
      Left            =   3360
      Picture         =   "frmmodipassword.frx":CCF8
      TabIndex        =   4
      Top             =   720
      UseMaskColor    =   -1  'True
      Width           =   975
   End
   Begin VB.Frame Frame1 
      BackColor       =   &H00FF8080&
      Caption         =   "--修改密码--"
      Height          =   2055
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   3015
      Begin VB.TextBox Text3 
         BackColor       =   &H00FF8080&
         Height          =   270
         Left            =   1320
         TabIndex        =   3
         Text            =   "Text3"
         Top             =   1560
         Width           =   1455
      End
      Begin VB.TextBox Text2 
         BackColor       =   &H00FF8080&
         Height          =   270
         Left            =   1320
         TabIndex        =   2
         Text            =   "Text2"
         Top             =   960
         Width           =   1455
      End
      Begin VB.TextBox Text1 
         BackColor       =   &H00FF8080&
         Height          =   270
         Left            =   1320
         TabIndex        =   1
         Text            =   "Text1"
         Top             =   360
         Width           =   1455
      End
      Begin VB.Label Label3 
         Caption         =   "Label3"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1560
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "Label2"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   960
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "Label1"
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   360
         Width           =   975
      End
   End
End
Attribute VB_Name = "frmmodipassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim rdst As New ADODB.Recordset
        rdst.Open "select * from userlist where 用户名='" & frmuser.List1.List(frmuser.List1.ListIndex) & "'", g_conn
        If rdst!用户密码 <> Text1.Text Then
             tishi = MsgBox("旧密码不正确!", vbOKOnly, "错误")
        Else
             If Text1.Text = Text2.Text Then
                 tishi = MsgBox("新密码与旧密码相同,请重新输入!", vbOKOnly, "错误")
             Else
                 If Text2.Text <> Text3.Text Then
                      tishi = MsgBox("新密码两次输入不相同,请重新输入!", vbOKOnly, "错误")
                 Else
                      Set rdst = Nothing
                      rdst.Open "update userlist set 用户密码= '" & Text3.Text & "'where 用户名='" & frmuser.List1.Text & "'", g_conn
                      tishi = MsgBox("密码修改成功,请牢记你的新密码!", vbOKOnly, "密码修改")
                      Unload Me
                      frmuser.Show
                 End If
              End If
        End If
End Sub

Private Sub Command2_Click()
        Unload Me
End Sub

Private Sub Form_Load()
'        askn.ApplySkin Me.hWnd
        Me.Left = 5565
        Me.Top = 3945
        Me.Height = 3000
        Me.Width = 4560
        Frame1.Caption = "修改密码"
        Label1.Caption = "输入旧密码"
        Label2.Caption = "输入新密码"
        Label3.Caption = "确认新密码"
        Text1.Text = ""
        Text2.Text = ""
        Text3.Text = ""
        Command1.Caption = "确认"
        Command2.Caption = "取消"
        Command1.Enabled = False
        Text1.PasswordChar = "*"
        Text2.PasswordChar = "*"
        Text3.PasswordChar = "*"
End Sub
Private Sub Text3_Change()
        Command1.Enabled = True
End Sub

⌨️ 快捷键说明

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