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

📄 chang_pwd.frm

📁 次项目是一个用VB开发的图书管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form chang_pwd 
   Caption         =   "修改密码"
   ClientHeight    =   2865
   ClientLeft      =   60
   ClientTop       =   465
   ClientWidth     =   4920
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2865
   ScaleWidth      =   4920
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2400
      TabIndex        =   5
      Top             =   1800
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "确定"
      Height          =   375
      Left            =   840
      TabIndex        =   4
      Top             =   1800
      Width           =   1095
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2160
      TabIndex        =   3
      Top             =   960
      Width           =   1695
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   2160
      TabIndex        =   2
      Top             =   240
      Width           =   1695
   End
   Begin VB.Label Label2 
      Caption         =   "确认新密码:"
      Height          =   375
      Left            =   720
      TabIndex        =   1
      Top             =   960
      Width           =   1455
   End
   Begin VB.Label Label1 
      Caption         =   "输入新密码:"
      Height          =   375
      Left            =   720
      TabIndex        =   0
      Top             =   360
      Width           =   1455
   End
End
Attribute VB_Name = "chang_pwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
Dim rs_change As New ADODB.Recordset
If Trim(Text1.Text) <> Trim(Text2.Text) Then
MsgBox "两次密码输入的不一致", vbOKOnly + vbExclamation, ""
Text1.SetFocus
Text1.Text = ""
Text2.Text = ""
Else
sql = "select * from 密码表 where 用户名='" & userID & "'"
rs_change.Open sql, conn, adOpenKeyset, adLockPessimistic
rs_change.Fields(1) = Text1.Text
rs_change.Update
rs_change.Close
MsgBox "密码修改成功", vbOKOnly + vbExclamation, ""
Unload Me
End If

End Sub

Private Sub Command2_Click()
Unload Me
End Sub

⌨️ 快捷键说明

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