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

📄 pass_chg_form.frm

📁 Attendance Report System of student in Visual Basic and Oracle AS Backend
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form PASS_CHG_FORM 
   AutoRedraw      =   -1  'True
   BorderStyle     =   1  'Fixed Single
   Caption         =   "Change Password"
   ClientHeight    =   4020
   ClientLeft      =   45
   ClientTop       =   390
   ClientWidth     =   6015
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Moveable        =   0   'False
   ScaleHeight     =   4020
   ScaleWidth      =   6015
   StartUpPosition =   2  'CenterScreen
   Begin VB.Frame Frame1 
      BackColor       =   &H00FFFFFF&
      ForeColor       =   &H00FFFFFF&
      Height          =   4815
      Left            =   0
      TabIndex        =   0
      Top             =   0
      Width           =   6015
      Begin VB.TextBox t3 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   3240
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   10
         Top             =   2880
         Width           =   1815
      End
      Begin VB.TextBox t2 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   3240
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   9
         Top             =   2160
         Width           =   1815
      End
      Begin VB.TextBox t1 
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         IMEMode         =   3  'DISABLE
         Left            =   3240
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   8
         Top             =   1320
         Width           =   1815
      End
      Begin VB.CommandButton passcmd2 
         BackColor       =   &H00FFC0FF&
         Caption         =   "Cancel"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   3120
         Style           =   1  'Graphical
         TabIndex        =   2
         ToolTipText     =   "Click to Quit"
         Top             =   3480
         Width           =   1095
      End
      Begin VB.CommandButton passcmd1 
         BackColor       =   &H00FFC0FF&
         Caption         =   "Set"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   14.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   375
         Left            =   840
         Style           =   1  'Graphical
         TabIndex        =   1
         ToolTipText     =   "Click To Set Password"
         Top             =   3480
         Width           =   1095
      End
      Begin MSComctlLib.StatusBar StatusBar1 
         Height          =   375
         Left            =   4080
         TabIndex        =   3
         Top             =   600
         Width           =   735
         _ExtentX        =   1296
         _ExtentY        =   661
         _Version        =   393216
         BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
            NumPanels       =   1
            BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
               Style           =   1
               Enabled         =   0   'False
               TextSave        =   "CAPS"
            EndProperty
         EndProperty
         BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
            Name            =   "Palatino Linotype"
            Size            =   9.75
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
      End
      Begin VB.Label passlbl2 
         BackStyle       =   0  'Transparent
         Caption         =   "Password     Change"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   20.25
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF0000&
         Height          =   1215
         Left            =   1680
         TabIndex        =   7
         Top             =   120
         Width           =   2175
      End
      Begin VB.Label passlbl1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Enter Old Password:-"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00FF8080&
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1440
         Width           =   2895
      End
      Begin VB.Label Label1 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Enter New Password:-"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   255
         Left            =   240
         TabIndex        =   5
         Top             =   2160
         Width           =   2895
      End
      Begin VB.Label Label2 
         BackColor       =   &H00FFFFFF&
         Caption         =   "Retype New Password:-"
         BeginProperty Font 
            Name            =   "Palatino Linotype"
            Size            =   12
            Charset         =   0
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         ForeColor       =   &H00C00000&
         Height          =   375
         Left            =   240
         TabIndex        =   4
         Top             =   2760
         Width           =   2895
      End
      Begin VB.Line Line1 
         BorderColor     =   &H00C0E0FF&
         BorderWidth     =   2
         X1              =   0
         X2              =   5880
         Y1              =   1800
         Y2              =   1800
      End
      Begin VB.Line Line2 
         BorderColor     =   &H00C0E0FF&
         BorderWidth     =   2
         X1              =   0
         X2              =   5880
         Y1              =   3360
         Y2              =   3360
      End
      Begin VB.Image Image1 
         Height          =   1065
         Left            =   360
         Picture         =   "PASS_CHG_FORM.frx":0000
         Top             =   240
         Width           =   945
      End
   End
End
Attribute VB_Name = "PASS_CHG_FORM"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim rs As New ADODB.Recordset
Dim LOGIN As Integer
Dim db As New ADODB.Connection
Dim npass, rpass, dpass, SQL1 As String

Private Sub Form_Load()
On Error GoTo msg
db.Open "Provider=OraOLEDB.Oracle.1;Password=TIGER;Persist Security Info=True;User ID=SCOTT"
rs.Open "select * from ARS_TEACHENTRY WHERE TID= " & LOGIN_FORM.LOGINID & "", db, adOpenKeyset, adLockPessimistic
dpass = rs.Fields(1)
GoTo succ
msg:
      MsgBox "Falied To Connect To Database", vbCritical, "Error Message"
succ:
End Sub


Private Sub passcmd1_Click()

If t1.Text = vbNullString Or t2.Text = "" Or t3.Text = "" Then
MsgBox "Please Enter All Fields", vbCritical, "Password change"
t1.Text = ""
t2.Text = ""
t3.Text = ""
 Else
If t2.Text <> t3.Text Then
MsgBox "New & Retype Password Does Not Match", vbQuestion, "Password Change"
t2.Text = ""
t3.Text = ""
Else
  dpass = rs.Fields(1)
 rs.Update 1, t2.Text
rs.Fields.Refresh
 MsgBox "New Password Sucessfully Set"
db.Close
Set db = Nothing
Set rs = Nothing

ARS_MDI.Enabled = True
Unload Me
End If
End If
End Sub
Private Sub passcmd2_Click()
db.Close
Set db = Nothing
Set rs = Nothing
ARS_MDI.Enabled = True
Unload Me
End Sub






Private Sub t2_Click()
On Error GoTo msg
If t1.Text <> dpass Then
t1.Text = ""
t2.Text = ""
t3.Text = ""
msg:
MsgBox "Invalid Old Password", vbQuestion, "Password Change"
End If
End Sub

Private Sub t3_Click()
On Error GoTo msg
  dpass = rs.Fields(1)
  
If t1.Text <> dpass Then

t1.Text = ""
t2.Text = ""
t3.Text = ""
msg:
MsgBox "Invalid Old Password", vbQuestion, "Password Change"
End If

End Sub

⌨️ 快捷键说明

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