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

📄 frmpas.frm

📁 引用枕善居的天宏钢构仓库管理系统 Ver 2.96
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form PasModify 
   BackColor       =   &H00C0C0FF&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改密码"
   ClientHeight    =   2295
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4680
   HelpContextID   =   249
   Icon            =   "frmpas.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2295
   ScaleWidth      =   4680
   ShowInTaskbar   =   0   'False
   StartUpPosition =   1  '所有者中心
   Begin VB.CommandButton Cancel 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   1680
      WhatsThisHelpID =   249
      Width           =   1095
   End
   Begin VB.CommandButton Modify 
      Appearance      =   0  'Flat
      BackColor       =   &H00C0E0FF&
      Caption         =   "修改"
      Height          =   375
      Left            =   480
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   1680
      WhatsThisHelpID =   249
      Width           =   1215
   End
   Begin VB.TextBox NewPas2 
      BackColor       =   &H00C0FFC0&
      ForeColor       =   &H00FF0000&
      Height          =   375
      HelpContextID   =   249
      IMEMode         =   3  'DISABLE
      Left            =   960
      PasswordChar    =   "*"
      TabIndex        =   5
      Top             =   1080
      WhatsThisHelpID =   249
      Width           =   2535
   End
   Begin VB.TextBox NewPas1 
      BackColor       =   &H00C0FFC0&
      ForeColor       =   &H00FF0000&
      Height          =   375
      HelpContextID   =   249
      IMEMode         =   3  'DISABLE
      Left            =   960
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   600
      WhatsThisHelpID =   249
      Width           =   2535
   End
   Begin VB.TextBox OldPas 
      BackColor       =   &H00C0FFC0&
      ForeColor       =   &H00000000&
      Height          =   375
      HelpContextID   =   249
      IMEMode         =   3  'DISABLE
      Left            =   960
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   120
      WhatsThisHelpID =   249
      Width           =   2535
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   855
      Left            =   1560
      Top             =   720
      Visible         =   0   'False
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   1508
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   ""
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "验证:"
      Height          =   255
      Left            =   120
      TabIndex        =   2
      Top             =   1200
      WhatsThisHelpID =   249
      Width           =   735
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "新密码:"
      Height          =   255
      Left            =   120
      TabIndex        =   1
      Top             =   720
      WhatsThisHelpID =   249
      Width           =   735
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "原密码:"
      Height          =   255
      Left            =   120
      TabIndex        =   0
      Top             =   240
      WhatsThisHelpID =   249
      Width           =   735
   End
End
Attribute VB_Name = "PasModify"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'****************************************************************************
'人人为我,我为人人
'枕善居收藏整理
'发布日期:2008/05/11
'描    述:天宏钢构仓库管理系统 Ver 2.96
'网    站:http://www.Mndsoft.com/  (VB6源码博客)
'网    站:http://www.VbDnet.com/   (VB.NET源码博客,主要基于.NET2005)
'e-mail  :Mndsoft@163.com
'e-mail  :Mndsoft@126.com
'OICQ    :88382850
'          如果您有新的好的代码别忘记给枕善居哦!
'****************************************************************************
Private Sub Cancel_Click()
  Unload Me
End Sub

Private Sub Form_Load()
    On Error Resume Next

Adodc1.ConnectionString = DataConnectString
    Adodc1.RecordSource = "select * from 用户管理 where 用户名='username'"
 Adodc1.Refresh
End Sub

Private Sub Modify_Click()
   
   If OldPas.Text <> UserPas Then
      MsgBox "原密码错误!"
      Exit Sub
   End If
   
   If NewPas1.Text <> NewPas2.Text Then
      MsgBox "两次密码不一致!"
      Exit Sub
   End If
   
    On Error Resume Next

    '查找用户名
    If Adodc1.Recordset.Fields("用户名") = UserName Then
        '设置新密码
       Set adoRs = adoCon.Execute("UPDATE 用户管理 SET 用户密码= '" + NewPas1.Text + "' where 用户名='" + UserName + "'")
  Adodc1.Refresh
   
        MsgBox "修改成功!"
   End If
   
   Unload Me
   
End Sub

Private Sub NewPas1_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then              '如果按下的是回车键,则光标落到文本框当中
NewPas2.SetFocus
End If
End Sub


Private Sub NewPas2_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then              '如果按下的是回车键,则光标落到文本框当中
Modify.SetFocus
End If
End Sub

Private Sub OldPas_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then              '如果按下的是回车键,则光标落到文本框当中
NewPas1.SetFocus
End If
End Sub

⌨️ 快捷键说明

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