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

📄 scgl_psw.frm

📁 该系统为酒店日常管理提供了很大的方便
💻 FRM
字号:
VERSION 5.00
Begin VB.Form scgl_psw 
   ClientHeight    =   8880
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   11880
   ControlBox      =   0   'False
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   8880
   ScaleWidth      =   11880
   StartUpPosition =   3  'Windows Default
   Begin VB.Frame Frame1 
      Height          =   5370
      Left            =   810
      TabIndex        =   12
      Top             =   945
      Width           =   7170
      Begin VB.TextBox m_pass 
         Height          =   465
         IMEMode         =   3  'DISABLE
         Left            =   3720
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1560
         Width           =   2175
      End
      Begin VB.TextBox m_psw2 
         Height          =   465
         IMEMode         =   3  'DISABLE
         Left            =   3690
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   3
         Top             =   2970
         Width           =   2175
      End
      Begin VB.TextBox m_psw1 
         Height          =   465
         IMEMode         =   3  'DISABLE
         Left            =   3690
         MaxLength       =   10
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   2205
         Width           =   2175
      End
      Begin VB.CommandButton cmd_no 
         Caption         =   "退出"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   555
         Left            =   4200
         TabIndex        =   5
         Top             =   4230
         Width           =   1320
      End
      Begin VB.CommandButton cmd_yes 
         Caption         =   "确定"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   555
         Left            =   2280
         TabIndex        =   4
         Top             =   4230
         Width           =   1320
      End
      Begin VB.Label Label4 
         Caption         =   "输入旧密码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1755
         TabIndex        =   16
         Top             =   1620
         Width           =   1455
      End
      Begin VB.Label Label3 
         Caption         =   "效验新密码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1755
         TabIndex        =   15
         Top             =   3105
         Width           =   1455
      End
      Begin VB.Label Label2 
         Caption         =   "输入新密码"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1755
         TabIndex        =   14
         Top             =   2362
         Width           =   1455
      End
      Begin VB.Label Label1 
         BeginProperty Font 
            Name            =   "黑体"
            Size            =   18
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   645
         Left            =   2040
         TabIndex        =   13
         Top             =   360
         Width           =   3390
      End
   End
   Begin VB.Timer XT_Timer 
      Interval        =   1000
      Left            =   0
      Top             =   7200
   End
   Begin VB.Frame JZ 
      Enabled         =   0   'False
      Height          =   600
      Left            =   135
      TabIndex        =   0
      Top             =   8220
      Width           =   9870
      Begin VB.Label JZ_DQSJ2 
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   8160
         TabIndex        =   11
         Top             =   225
         Width           =   1050
      End
      Begin VB.Label JZ_NAME 
         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          =   330
         Left            =   450
         TabIndex        =   10
         Top             =   225
         Width           =   690
      End
      Begin VB.Label JZ_USER 
         BackStyle       =   0  'Transparent
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   330
         Left            =   1305
         TabIndex        =   9
         Top             =   225
         Width           =   1500
      End
      Begin VB.Label JZ_JRSJ1 
         Caption         =   "进入时间:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   3285
         TabIndex        =   8
         Top             =   300
         Width           =   930
      End
      Begin VB.Label JZ_JRSJ2 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   4440
         TabIndex        =   7
         Top             =   240
         Width           =   1230
      End
      Begin VB.Label JZ_DQSJ1 
         Caption         =   "当前时间:"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   195
         Left            =   6840
         TabIndex        =   6
         Top             =   240
         Width           =   1065
      End
   End
End
Attribute VB_Name = "scgl_psw"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim i As Integer, key_index As Integer
Dim pub_rec As Recordset
Dim t_rec As Recordset
Dim pass As String

Sub MAIN(t_gnmc As String)
   Label1.Caption = t_gnmc
   JZ_USER = SYS_USER + Space(1) + SYS_NAME
   JZ_JRSJ2 = Time()
   JZ_DQSJ2 = Time()
End Sub

Private Sub cmd_no_Click()
    Unload Me
    yx_main.Show (1)
End Sub

Private Sub cmd_no_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyEscape Then
    Unload Me
    yx_main.Show (1)
End If
End Sub

Private Sub cmd_yes_Click()
    Dim response As String
    Dim j As Integer
    j = j + 1
    If j > 3 Then
            Unload Me
            yx_main.Show (1)
    End If
    If Trim(UCase(m_psw1.Text)) = Trim(UCase(m_psw2.Text)) Then
                     t_rec.Edit
                     If t_rec!lock_no < 999 Then
                             t_rec!lock_no = t_rec!lock_no + 1
                     Else
                             t_rec!lock_no = 0
                     End If
                     Dim t As New HOTEL_TOOLS
                     t_rec!czy_pass = t.encode(m_psw1.Text)
                     response = MsgBox("成功修改口令", 1)
                     If response = "1" Then
                     t_rec.Update
                         Unload Me
                         yx_main.Show (1)
                     Else
                         Unload Me
                         yx_main.Show (1)
                     End If
             Else
                     m_psw2.Text = ""
                     m_psw2.SetFocus
                     MsgBox ("无效的口令验证")
             End If
End Sub

Private Sub Form_Load()
    i = 0
    m_pass.Text = ""
    m_psw1.Text = ""
    m_psw2.Text = ""
    Me.KeyPreview = True
    Frame1.Left = (Screen.Width - Frame1.Width) / 2
    Frame1.Top = (Screen.Height - Frame1.Height) / 2
    Set t_rec = PUB_data.OpenRecordset("select lock_no,czy,czy_pass  from SYS_USER", 2, 0, 2)
    If Not t_rec.BOF Then
        t_rec.MoveLast
    Else
        MsgBox "无当前记录", 64
    End If
End Sub

Private Sub m_pass_KeyDown(KeyCode As Integer, Shift As Integer)
    If KeyCode = vbKeyReturn Or KeyCode = vbKeyTab Or KeyCode = vbKeyDown Then
            m_psw1.SetFocus
    End If
End Sub
Private Sub m_pass_LostFocus()
    If IsNumeric(m_pass.Text) Or Len(m_pass.Text) = 0 Then
            Dim t As New HOTEL_TOOLS
            If Not t_rec!czy_pass = t.encode(m_pass.Text) Then
                MsgBox "无效口令!", 64
                m_pass.Text = ""
            End If
            i = i + 1
            If i > 3 Then
                    Unload Me
                    yx_main.Show (1)
            End If
    End If
End Sub

Private Sub m_psw1_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyReturn, vbKeyTab, vbKeyDown
        m_psw2.SetFocus
    Case vbKeyUp
        m_pass.SetFocus
    End Select
End Sub

Private Sub m_psw2_KeyDown(KeyCode As Integer, Shift As Integer)
    Select Case KeyCode
    Case vbKeyReturn, vbKeyTab, vbKeyDown
        cmd_yes.SetFocus
    Case vbKeyUp
        m_psw1.SetFocus
    End Select
End Sub
Private Sub XT_Timer_Timer()
    JZ_DQSJ2.Caption = Time()
End Sub

⌨️ 快捷键说明

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