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

📄 editpas.frm

📁 VB+ACCESS2000编写的VCD出租管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form EditPas 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改密码"
   ClientHeight    =   3645
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   3720
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   ScaleHeight     =   3645
   ScaleWidth      =   3720
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "关闭(&C)"
      Height          =   375
      Left            =   2520
      TabIndex        =   6
      Top             =   3120
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修改(&E)"
      Height          =   375
      Left            =   1320
      TabIndex        =   5
      Top             =   3120
      Width           =   1095
   End
   Begin VB.Frame Frame1 
      Caption         =   "修改"
      Height          =   2895
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3495
      Begin VB.TextBox Text4 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   960
         Width           =   1935
      End
      Begin VB.TextBox Text3 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   2160
         Width           =   1935
      End
      Begin VB.TextBox Text2 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1200
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   1560
         Width           =   1935
      End
      Begin VB.TextBox Text1 
         Appearance      =   0  'Flat
         BackColor       =   &H00C0FFFF&
         Height          =   375
         Left            =   1200
         TabIndex        =   1
         Top             =   360
         Width           =   1935
      End
      Begin VB.Line Line1 
         X1              =   0
         X2              =   3480
         Y1              =   1440
         Y2              =   1440
      End
      Begin VB.Label Label4 
         Caption         =   "旧密码:"
         Height          =   255
         Left            =   240
         TabIndex        =   10
         Top             =   1080
         Width           =   735
      End
      Begin VB.Label Label3 
         Caption         =   "确认密码:"
         Height          =   375
         Left            =   240
         TabIndex        =   9
         Top             =   2280
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "新密码:"
         Height          =   255
         Left            =   240
         TabIndex        =   8
         Top             =   1680
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "用户名:"
         Height          =   255
         Left            =   240
         TabIndex        =   7
         Top             =   480
         Width           =   735
      End
   End
End
Attribute VB_Name = "EditPas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Command1_Click()
Dim SQL As String
If Text1.Text = "" Then
   MsgBox "对不起,用户名必须填写", vbInformation + vbOKOnly, "警告"
   Text1.SetFocus
   Exit Sub
End If
If Text2.Text = "" Then
   MsgBox "对不起,密码必须填写", vbInformation + vbOKOnly, "警告"
   Text2.SetFocus
   Exit Sub
End If
If Text3.Text = "" Then
   MsgBox "对不起,密码确认必须填写", vbInformation + vbOKOnly, "警告"
   Text3.SetFocus
   Exit Sub
End If
If Text4.Text = "" Then
   MsgBox "对不起,密码必须填写", vbInformation + vbOKOnly, "警告"
   Text4.SetFocus
   Exit Sub
End If
If Text2.Text <> Text3.Text Then
   MsgBox "对不起,两次密码输入不一致,请重新输入", vbInformation + vbOKOnly, "警告"
   Text2.Text = ""
   Text3.Text = ""
   Text2.SetFocus
   Exit Sub
End If
SQL = "select * from usetable where 用户=""" & Text1.Text & """"
OpenDBFile
OpenRS (SQL)
If Not gRst.EOF Then
   If Text4.Text <> gRst("密码") Then
      CloseRS
      MsgBox "对不起,你的密码错误,请重新输入!", vbInformation + vbOKOnly, "警告"
      Text4.Text = ""
      Text4.SetFocus
      Exit Sub
   End If
   CloseRS
   SQL = "update usetable set 密码=""" & Text2.Text & """ where 用户=""" & Text1.Text & """"
   OpenDBFile
   gCon.Execute SQL
   CloseDBFile
   MsgBox "密码修改成功!", vbInformation + vbOKOnly, "提示"
Else
   MsgBox "对不起,用户名错误,请重新输入!", vbInformation + vbOKOnly, "警告"
   Text1.Text = ""
   Text1.SetFocus
   CloseRS
   Exit Sub
End If
Unload Me
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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