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

📄 mdpw.frm

📁 这是我同学的一个用VC+SQL SERVER2000开发的图书管理信息系统.请收下.做的很好,界面友好.
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form5 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "修改密码"
   ClientHeight    =   1950
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   3390
   Icon            =   "MdPW.frx":0000
   LinkTopic       =   "Form5"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1950
   ScaleWidth      =   3390
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "取  消"
      Height          =   375
      Left            =   2400
      TabIndex        =   7
      Top             =   1440
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "修  改"
      Height          =   375
      Left            =   2400
      TabIndex        =   6
      Top             =   840
      Width           =   855
   End
   Begin VB.TextBox Text3 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   720
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1440
      Width           =   1575
   End
   Begin VB.TextBox Text2 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   720
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   840
      Width           =   1575
   End
   Begin VB.TextBox Text1 
      Height          =   375
      Left            =   720
      TabIndex        =   3
      Top             =   240
      Width           =   1575
   End
   Begin VB.Label Label3 
      Caption         =   "新密码"
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   1440
      Width           =   735
   End
   Begin VB.Label Label2 
      Caption         =   "旧密码"
      Height          =   375
      Left            =   120
      TabIndex        =   1
      Top             =   840
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "用户名"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   240
      Width           =   735
   End
End
Attribute VB_Name = "Form5"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim i As Integer

'检查正确的密码
frmLogin.Data1.Recordset.MoveLast
frmLogin.Data1.Recordset.MoveFirst
For i = 1 To frmLogin.Data1.Recordset.RecordCount
    If Text1.text = frmLogin.Data1.Recordset.Fields("UserName") Then
        If Text2.text = frmLogin.Data1.Recordset.Fields("PW") Then
            frmLogin.Data1.Recordset.Edit
            frmLogin.Data1.Recordset.Fields("PW") = Text3.text
            frmLogin.Data1.Recordset.Update
            frmLogin.Data1.Refresh
            MsgBox "密码修改成功", 48, "提醒"
            Exit Sub
        Else
            MsgBox "无效的密码,请重试!", 48, "提醒"
            Text2.SetFocus
            Exit Sub
        End If
    End If
    frmLogin.Data1.Recordset.MoveNext
Next i
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()
Text1.text = frmLogin.txtUserName.text
Text1.Enabled = False
End Sub

⌨️ 快捷键说明

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