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

📄 frmsyspwd.frm

📁 学生信息管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmsyspwd 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Form1"
   ClientHeight    =   4530
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6840
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MDIChild        =   -1  'True
   MinButton       =   0   'False
   ScaleHeight     =   4530
   ScaleWidth      =   6840
   Begin VB.Frame Frame1 
      Height          =   2775
      Left            =   1080
      TabIndex        =   2
      Top             =   360
      Width           =   4575
      Begin VB.TextBox Text1 
         Height          =   375
         Left            =   1560
         TabIndex        =   6
         Top             =   600
         Width           =   1575
      End
      Begin VB.TextBox Text3 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1560
         PasswordChar    =   "*"
         TabIndex        =   5
         Top             =   1560
         Width           =   1575
      End
      Begin VB.TextBox Text4 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1560
         PasswordChar    =   "*"
         TabIndex        =   4
         Top             =   1920
         Width           =   1575
      End
      Begin VB.TextBox Text2 
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   1560
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   1080
         Width           =   1575
      End
      Begin VB.Label Label1 
         Caption         =   "用户名:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   10
         Top             =   600
         Width           =   975
      End
      Begin VB.Label Label2 
         Caption         =   "原密码:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   9
         Top             =   1080
         Width           =   975
      End
      Begin VB.Label Label3 
         Caption         =   "新密码:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   720
         TabIndex        =   8
         Top             =   1560
         Width           =   975
      End
      Begin VB.Label Label4 
         Caption         =   "新密码:"
         BeginProperty Font 
            Name            =   "楷体_GB2312"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   495
         Left            =   720
         TabIndex        =   7
         Top             =   2040
         Width           =   975
      End
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   1800
      TabIndex        =   1
      Top             =   3480
      Width           =   1215
   End
   Begin VB.CommandButton cmdCancel 
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "楷体_GB2312"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   3840
      TabIndex        =   0
      Top             =   3480
      Width           =   1335
   End
End
Attribute VB_Name = "frmsyspwd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub cmdcancel_Click()
    Unload Me
End Sub

Private Sub cmdOK_Click()
    Dim txtSQL, MsgText As String
    Dim mrc As New ADODB.Recordset
    
    If Text3.Text <> Text4.Text Then
    MsgBox "两次输入的密码不一致,请重新输入", vbOKOnly + vbInformation, ""
     Text3.SetFocus
     Exit Sub
     End If

    txtSQL = "select * from 用户表 where 用户名 ='" & Text1.Text & "'and " & " 密码 = '" & Text2.Text & "'"
    Set mrc = ExecuteSQL(txtSQL, MsgText)
    If mrc.EOF = True Then
    MsgBox "用户名或老密码错误", vbOKOnly + vbExclamation, ""
    Text1.Text = ""
    Text1.SetFocus
    Text2.Text = ""
    Exit Sub
    Else
    mrc.Fields(1) = Text3.Text
        mrc.Update
       MsgBox "密码修改成功!", vbOKOnly + vbExclamation, "修改密码"
        Me.Hide
         mrc.Close
        
    End If
End Sub


⌨️ 快捷键说明

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