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

📄 frmpassword.frm

📁 排队分诊管理系统源代码!该代码使用VB6开发环境
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.Form frmPassword 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "修改登录密码"
   ClientHeight    =   1800
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   4110
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1800
   ScaleWidth      =   4110
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消(&C)"
      Height          =   375
      Left            =   2880
      TabIndex        =   4
      Top             =   1320
      Width           =   1095
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定(&O)"
      Height          =   375
      Left            =   1800
      TabIndex        =   3
      Top             =   1320
      Width           =   1095
   End
   Begin VB.TextBox txtReplyPass 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1560
      MaxLength       =   16
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   840
      Width           =   2415
   End
   Begin VB.TextBox txtOldPass 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1560
      MaxLength       =   16
      PasswordChar    =   "*"
      TabIndex        =   0
      Top             =   120
      Width           =   2415
   End
   Begin VB.TextBox txtNewPass 
      Height          =   300
      IMEMode         =   3  'DISABLE
      Left            =   1560
      MaxLength       =   16
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   480
      Width           =   2415
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Height          =   300
      Index           =   0
      Left            =   120
      TabIndex        =   5
      Top             =   120
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   529
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Bevel           =   2
            Text            =   "旧的系统密码:"
            TextSave        =   "旧的系统密码:"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Height          =   300
      Index           =   1
      Left            =   120
      TabIndex        =   6
      Top             =   480
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   529
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Bevel           =   2
            Text            =   "新的系统密码:"
            TextSave        =   "新的系统密码:"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar StatusBar1 
      Height          =   300
      Index           =   2
      Left            =   120
      TabIndex        =   7
      Top             =   840
      Width           =   1335
      _ExtentX        =   2355
      _ExtentY        =   529
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   1
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Bevel           =   2
            Text            =   "重复一次密码:"
            TextSave        =   "重复一次密码:"
         EndProperty
      EndProperty
   End
End
Attribute VB_Name = "frmPassword"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Dim m_tagErrInfo                As TYPE_ERRORINFO       '错误信息

Private Sub cmdCancel_Click()
    On Error Resume Next
    Unload Me
End Sub

Private Sub cmdOK_Click()
    On Error GoTo ERROR_EXIT
    Dim sPass As String, sCliper As String
    
    sPass = ""
    sCliper = ""
    If Trim$(txtOldPass.Text) <> "" Then
        sPass = txtOldPass.Text
        modCipher.Cipher "CoBeyond_Queue_Yixing", sPass, sCliper
    End If
    If sCliper <> m_strPass Or Trim$(txtNewPass.Text) <> Trim$(txtReplyPass.Text) Then
        MsgBox "输入的密码不正确,请重新输入!", vbOKOnly, "系统提示"
        txtOldPass.Text = ""
        txtNewPass.Text = ""
        txtReplyPass.Text = ""
        txtOldPass.SetFocus
        Exit Sub
    End If
    
    '加密密码
    sPass = ""
    sCliper = ""
    If Trim$(txtNewPass.Text) <> "" Then
        sPass = txtNewPass.Text
        modCipher.Cipher "CoBeyond_Queue_Yixing", sPass, sCliper
    End If
    
    '更新密码
    send_data "PCWD" & vbTab & m_strUser & vbTab & m_strPass & vbTab & sCliper
    
    '退出窗口
    Unload Me
    
    Exit Sub
ERROR_EXIT:
    m_tagErrInfo.strErrDate = Format(Now, "yyyy-mm-dd hh:mm:ss")
    m_tagErrInfo.strErrFile = "frmPassword"
    m_tagErrInfo.strErrFunc = "cmdOK_Click"
    m_tagErrInfo.nErrNum = Err.Number
    m_tagErrInfo.strErrDesc = Error(Err.Number)
    If Err.Number <> 0 Then Err.Clear
    modErrorInfo.WriteErrLog m_tagErrInfo
End Sub

Private Sub Form_Terminate()
    On Error Resume Next
    Set frmPassword = Nothing
End Sub

Private Sub txtNewPass_GotFocus()
    On Error Resume Next
    txtNewPass.BackColor = &H80000018
End Sub

Private Sub txtNewPass_KeyPress(KeyAscii As Integer)
    On Error Resume Next
    If KeyAscii = 13 Then  '是回车键?
    KeyAscii = 0 '0取消输入
    SendKeys "{tab}"
    End If
End Sub

Private Sub txtNewPass_LostFocus()
    On Error Resume Next
    txtNewPass.BackColor = &H80000005
End Sub

Private Sub txtOldPass_GotFocus()
    On Error Resume Next
    txtOldPass.BackColor = &H80000018
End Sub

Private Sub txtOldPass_KeyPress(KeyAscii As Integer)
    On Error Resume Next
    If KeyAscii = 13 Then  '是回车键?
    KeyAscii = 0 '0取消输入
    SendKeys "{tab}"
    End If
End Sub

Private Sub txtOldPass_LostFocus()
    On Error Resume Next
    txtOldPass.BackColor = &H80000005
End Sub

Private Sub txtReplyPass_GotFocus()
    On Error Resume Next
    txtReplyPass.BackColor = &H80000018
End Sub

Private Sub txtReplyPass_KeyPress(KeyAscii As Integer)
    On Error Resume Next
    If KeyAscii = 13 Then  '是回车键?
    KeyAscii = 0 '0取消输入
    SendKeys "{tab}"
    End If
End Sub

Private Sub txtReplyPass_LostFocus()
    On Error Resume Next
    txtReplyPass.BackColor = &H80000005
End Sub

⌨️ 快捷键说明

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