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

📄 frmpws.frm

📁 这是一个药品人事管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
Begin VB.Form frmPWS 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "口令修改"
   ClientHeight    =   3135
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   5940
   Icon            =   "frmPWS.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3135
   ScaleWidth      =   5940
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Height          =   2895
      Left            =   4440
      TabIndex        =   11
      Top             =   120
      Width           =   1335
      Begin Threed.SSCommand cmdadd 
         Height          =   495
         Left            =   120
         TabIndex        =   12
         Top             =   360
         Width           =   1095
         _Version        =   65536
         _ExtentX        =   1931
         _ExtentY        =   873
         _StockProps     =   78
         Caption         =   "&A.确  定"
      End
      Begin Threed.SSCommand cmdexit 
         Height          =   495
         Left            =   120
         TabIndex        =   13
         Top             =   1080
         Width           =   1095
         _Version        =   65536
         _ExtentX        =   1931
         _ExtentY        =   873
         _StockProps     =   78
         Caption         =   "&Q.退 出"
      End
   End
   Begin VB.Frame Frame1 
      Height          =   2895
      Left            =   120
      TabIndex        =   3
      Top             =   120
      Width           =   4335
      Begin VB.TextBox txtInfo 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   325
         IMEMode         =   3  'DISABLE
         Index           =   4
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   2280
         Width           =   2655
      End
      Begin VB.TextBox txtInfo 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   325
         Index           =   0
         Left            =   1320
         TabIndex        =   5
         Top             =   360
         Width           =   2655
      End
      Begin VB.TextBox txtInfo 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   325
         IMEMode         =   3  'DISABLE
         Index           =   1
         Left            =   1320
         TabIndex        =   4
         Top             =   840
         Width           =   2655
      End
      Begin VB.TextBox txtInfo 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   325
         IMEMode         =   3  'DISABLE
         Index           =   2
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   0
         Top             =   1320
         Width           =   2655
      End
      Begin VB.TextBox txtInfo 
         Alignment       =   2  'Center
         Appearance      =   0  'Flat
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   325
         IMEMode         =   3  'DISABLE
         Index           =   3
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   1
         Top             =   1800
         Width           =   2655
      End
      Begin VB.Label Label1 
         Caption         =   "用户代码"
         Height          =   255
         Index           =   0
         Left            =   120
         TabIndex        =   10
         Top             =   395
         Width           =   855
      End
      Begin VB.Label Label1 
         Caption         =   "旧 口 令"
         Height          =   255
         Index           =   1
         Left            =   120
         TabIndex        =   9
         Top             =   1355
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "新 口 令"
         Height          =   255
         Index           =   2
         Left            =   120
         TabIndex        =   8
         Top             =   1835
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "新口令确认"
         Height          =   255
         Index           =   3
         Left            =   120
         TabIndex        =   7
         Top             =   2415
         Width           =   975
      End
      Begin VB.Label Label1 
         Caption         =   "用 户 名"
         Height          =   255
         Index           =   4
         Left            =   120
         TabIndex        =   6
         Top             =   875
         Width           =   855
      End
   End
End
Attribute VB_Name = "frmPWS"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdadd_Click()
    If Len(Me.txtInfo(3)) = 0 Or Len(Me.txtInfo(4)) = 0 Then
        MsgBox "口令不能为空,请重新确认!", 48, "系统提示"
        
        With Me.txtInfo(3)
            .SelStart = 0
            .SelLength = Len(.Text)
            .SetFocus
        End With
        Exit Sub
    End If
    
    If Trim(Me.txtInfo(3)) <> Trim(Me.txtInfo(4)) Then
        MsgBox "两次输入的新口令不相同,请检查!", 48, "系统提示"
        
        With Me.txtInfo(3)
            .SelStart = 0
            .SelLength = Len(.Text)
            .SetFocus
        End With
        Exit Sub
    End If
    
    If Trim(Me.txtInfo(2)) <> Trim(UserInfo.Pwd) Then
        MsgBox "旧口令不对,请重新确认!", 48, "系统提示"
        
        With Me.txtInfo(2)
            .SelStart = 0
            .SelLength = Len(.Text)
            .SetFocus
        End With
        Exit Sub
    End If
    sSQL = "update t_user set password='" & Trim(Me.txtInfo(3)) & "' where usercode='" & Trim(UserInfo.UserCode) & "'"
        ConnWZ.Execute (sSQL)
        MsgBox "修改口令成功,下次登录时生效!", 64, "系统提示"
        Unload Me
End Sub

Private Sub cmdExit_Click()
    Unload Me
End Sub

Private Sub Form_Load()
    Me.txtInfo(0) = Trim(UserInfo.UserCode)
    Me.txtInfo(1) = Trim(UserInfo.UserName)
    Me.txtInfo(0).Enabled = False
    Me.txtInfo(1).Enabled = False
End Sub

Private Sub txtInfo_KeyPress(Index As Integer, KeyAscii As Integer)
If KeyAscii = vbKeyReturn Then
    Select Case Index
        Case 2
            With Me.txtInfo(3)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        Case 3
            With Me.txtInfo(4)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        Case 4
            Me.cmdAdd.SetFocus
    End Select
End If
End Sub

Private Sub txtInfo_KeyUp(Index As Integer, KeyCode As Integer, Shift As Integer)
Select Case Index
    Case 2
        If KeyCode = vbKeyRight Then
            With Me.txtInfo(3)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        End If
    Case 3
        If KeyCode = vbKeyRight Then
            With Me.txtInfo(4)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        End If
        If KeyCode = vbKeyLeft Then
            With Me.txtInfo(2)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        End If
    Case 4
        If KeyCode = vbKeyLeft Then
            With Me.txtInfo(3)
                .SelStart = 0
                .SelLength = Len(.Text)
                .SetFocus
            End With
        End If
        If KeyCode = vbKeyRight Then
            Me.cmdAdd.SetFocus
        End If
End Select
End Sub

⌨️ 快捷键说明

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