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

📄 frmlock.frm

📁 管理文档的原代码,可以把扫描的文档归类,便于查询
💻 FRM
字号:
VERSION 5.00
Begin VB.Form FrmLock 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "按Ctrl+Del+Enter解锁"
   ClientHeight    =   2475
   ClientLeft      =   45
   ClientTop       =   315
   ClientWidth     =   4230
   ControlBox      =   0   'False
   Icon            =   "FrmLock.frx":0000
   KeyPreview      =   -1  'True
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2475
   ScaleWidth      =   4230
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.PictureBox Picture2 
      BorderStyle     =   0  'None
      Height          =   135
      Left            =   0
      Picture         =   "FrmLock.frx":0442
      ScaleHeight     =   135
      ScaleWidth      =   5055
      TabIndex        =   9
      Top             =   600
      Width           =   5055
      Begin VB.PictureBox Picture3 
         BorderStyle     =   0  'None
         Height          =   135
         Left            =   0
         Picture         =   "FrmLock.frx":1CA8
         ScaleHeight     =   135
         ScaleWidth      =   5055
         TabIndex        =   10
         Top             =   0
         Width           =   5055
      End
   End
   Begin VB.Timer Timer1 
      Interval        =   50
      Left            =   120
      Top             =   2160
   End
   Begin VB.Frame FrameLock 
      Caption         =   "请输入操作员代号和密码"
      Height          =   1095
      Left            =   80
      TabIndex        =   4
      Top             =   840
      Visible         =   0   'False
      Width           =   4095
      Begin VB.TextBox TxtPassword 
         Height          =   315
         IMEMode         =   3  'DISABLE
         Left            =   2160
         PasswordChar    =   "*"
         TabIndex        =   8
         Top             =   650
         Width           =   1695
      End
      Begin VB.TextBox TxtCZYDH 
         Height          =   315
         Left            =   2160
         Locked          =   -1  'True
         TabIndex        =   7
         Top             =   240
         Width           =   1695
      End
      Begin VB.Image Image2 
         Height          =   480
         Left            =   120
         Picture         =   "FrmLock.frx":34D2
         Top             =   360
         Width           =   480
      End
      Begin VB.Label Label2 
         Caption         =   "操作员密码:"
         Height          =   195
         Left            =   960
         TabIndex        =   6
         Top             =   705
         Width           =   1215
      End
      Begin VB.Label Label1 
         Caption         =   "操作员代号:"
         Height          =   195
         Left            =   960
         TabIndex        =   5
         Top             =   300
         Width           =   1215
      End
   End
   Begin VB.CommandButton CmdCancel 
      Caption         =   "返回(&R)"
      Height          =   375
      Left            =   3320
      TabIndex        =   3
      Top             =   2040
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.PictureBox Picture1 
      BorderStyle     =   0  'None
      Height          =   615
      Left            =   0
      Picture         =   "FrmLock.frx":3914
      ScaleHeight     =   615
      ScaleWidth      =   5055
      TabIndex        =   2
      Top             =   0
      Width           =   5055
   End
   Begin VB.CommandButton CmdOK 
      Caption         =   "确定(&O)"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   2400
      TabIndex        =   1
      Top             =   2040
      Visible         =   0   'False
      Width           =   855
   End
   Begin VB.Image Image1 
      Height          =   480
      Left            =   160
      Picture         =   "FrmLock.frx":DCB6
      Top             =   1320
      Width           =   480
   End
   Begin VB.Label LabInfo 
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00404040&
      Height          =   855
      Left            =   720
      TabIndex        =   0
      Top             =   1200
      Width           =   3615
   End
End
Attribute VB_Name = "FrmLock"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

'使用本窗体需包含 g_User_Info的定义

Private Sub CmdCancel_Click()
   FrameLock.Visible = False
   CmdOK.Visible = False
   CmdCancel.Visible = False
End Sub

Private Sub CmdOK_Click()
   If TxtPassWord.Text = gUserPwd Then
      Unload Me
      FrmMain.Show
   Else
      MsgBox "密码错误!", vbInformation, "系统解锁"
      TxtPassWord.Text = ""
      TxtPassWord.SetFocus
   End If
End Sub

Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)
   If KeyCode = vbKeyReturn And Shift = 6 Then
      FrameLock.Visible = True
      CmdOK.Visible = True
      CmdCancel.Visible = True
      TxtCZYDH.Text = g_User_Info.Login_Name
      TxtPassWord.Text = ""
      TxtPassWord.SetFocus
   End If
End Sub

Private Sub Form_Load()
    LabInfo.Caption = "当前系统已被操作员" + g_User_Info.Login_Name + "锁定," + vbCrLf + vbCrLf + "若要解锁请按Ctrl+Del+Enter。"
End Sub

Private Sub Timer1_Timer()
 Picture3.Left = Picture3.Left + 50
   If Picture3.Left > Picture2.Left + Picture2.Width Then
      Picture3.Left = Picture2.Left - Picture3.Width
   End If
End Sub


⌨️ 快捷键说明

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