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

📄 pwdmod.frm

📁 这是一个非常 好的一个程序进行体会一下学生管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form11 
   BackColor       =   &H00FFC0C0&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "密码修改"
   ClientHeight    =   2265
   ClientLeft      =   4125
   ClientTop       =   1995
   ClientWidth     =   3465
   Icon            =   "pwdmod.frx":0000
   LinkTopic       =   "Form11"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2265
   ScaleWidth      =   3465
   Begin VB.CommandButton Command2 
      BackColor       =   &H00FFC0C0&
      Caption         =   "取   消"
      Height          =   375
      Left            =   2040
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   1680
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "确   定"
      Height          =   375
      Left            =   240
      Style           =   1  'Graphical
      TabIndex        =   4
      Top             =   1680
      Width           =   1095
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   1
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   960
      Width           =   1335
   End
   Begin VB.TextBox Text1 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Index           =   0
      Left            =   1800
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   360
      Width           =   1335
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请确认新密码 :"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   1
      Left            =   240
      TabIndex        =   1
      Top             =   960
      Width           =   1695
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "请输入新密码 :"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Index           =   0
      Left            =   240
      TabIndex        =   0
      Top             =   360
      Width           =   1695
   End
End
Attribute VB_Name = "Form11"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "RVB_UniqueId" ,"41FF01EE0257"
Attribute VB_Ext_KEY = "RVB_ModelStereotype" ,"Form"

Private Sub Command1_Click()
    Dim txtSQL As String
    Dim mrc As ADODB.Recordset
    Dim MsgText As String
    '判断输入用户名是否为空
    If Text1(0).Text <> Text1(1).Text Then
       MsgBox "两次输入的密码不同,请重新输入!", vbOKOnly + vbExclamation, "警告"
       Text1(0).SetFocus
       Text1(1).Text = ""
       Exit Sub
    End If
    If Text1(0).Text = "" Then
       MsgBox "密码不能为空!", vbOKOnly + vbExclamation, "警告"
       Text1(0).SetFocus
       Exit Sub
    End If
    txtSQL = "select * from User_info where User_id = " & "'" & Trim(UserName) & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    mrc.Fields(1) = Trim(Text1(0).Text)
    mrc.Update
    MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "密码修改"
    mrc.Close
    Me.Hide
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

Private Sub Text1_KeyDown(Index As Integer, KeyCode As Integer, Shift As Integer)
    If Index = 1 Then
        If KeyCode = 13 Then
            Call Command1_Click
        End If
    End If
End Sub

⌨️ 快捷键说明

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