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

📄 formentry.frm

📁 一套收费计算机系统
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Object = "{F0D2F211-CCB0-11D0-A316-00AA00688B10}#1.0#0"; "MSDATLST.OCX"
Object = "{F7E6FD03-521A-11D2-BEA3-000021DAEE5C}#2.0#0"; "LED.OCX"
Begin VB.Form Formentry 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登录口令"
   ClientHeight    =   1215
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   6555
   ControlBox      =   0   'False
   LinkTopic       =   "Form2"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   81
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   437
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   4440
      Top             =   120
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   120
      Top             =   480
      Visible         =   0   'False
      Width           =   1200
      _ExtentX        =   2117
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   2
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   2
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "FILE NAME=C:\My Documents\花寨子2000.udl"
      OLEDBString     =   ""
      OLEDBFile       =   "C:\My Documents\花寨子2000.udl"
      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.TextBox Text1 
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1200
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   720
      Width           =   1575
   End
   Begin MSDataListLib.DataCombo DataCombo1 
      Bindings        =   "Formentry.frx":0000
      Height          =   330
      Left            =   1200
      TabIndex        =   1
      Top             =   120
      Width           =   1575
      _ExtentX        =   2778
      _ExtentY        =   582
      _Version        =   393216
      ListField       =   "操作员"
      Text            =   ""
   End
   Begin LedOCX.LED LED1 
      Height          =   375
      Left            =   3000
      TabIndex        =   5
      Top             =   720
      Width           =   3495
      _ExtentX        =   6165
      _ExtentY        =   661
      ForeColor       =   16711680
      BackColor       =   14737632
      BorderStyle     =   1
      LEDSIZE         =   120
      LEDWIDTH        =   2
      LEDSTRING       =   ""
      LEDLEFT         =   0
      LEDTOP          =   60
      LEDXYRATE       =   0.4
   End
   Begin VB.Label Label3 
      Caption         =   "当前时间:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   3000
      TabIndex        =   4
      Top             =   195
      Width           =   1095
   End
   Begin VB.Label Label2 
      Caption         =   "密  码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   2
      Top             =   840
      Width           =   855
   End
   Begin VB.Label Label1 
      Caption         =   "操作员:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   255
      Left            =   240
      TabIndex        =   0
      Top             =   195
      Width           =   855
   End
End
Attribute VB_Name = "Formentry"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub DataCombo1_Click(Area As Integer)
If Area = 2 Then
staff = DataCombo1.BoundText
Text1.SetFocus
Adodc1.Recordset.Find "操作员='" & staff & "'", , adSearchForward, 1
End If
End Sub

Private Sub Form_Load()
Formentry.BorderStyle = 3
first = 1
End Sub


Private Sub Text1_KeyPress(KeyAscii As Integer)
'密码的输入
  If (KeyAscii >= 48 And KeyAscii <= 57) Or (KeyAscii >= 97 And KeyAscii <= 122) Or KeyAscii = 13 Or KeyAscii = 8 Then
    If Len(Text1.Text) < 5 Then '当输入小于5个字符时
      If KeyAscii = 13 Then
        If Text1.Text = "" Then
          MsgBox "密码不得为空", vbOKOnly, "警示"
          Text1.SetFocus
          Exit Sub
        Else
          
            If Text1.Text = Adodc1.Recordset.Fields(2).Value Then   '密码相符
               Unload Formentry
               Exit Sub
            Else
               MsgBox "密码不符,请重新输入", vbOKOnly, "警示"
               Text1.SetFocus
            End If
          
        End If
      End If
    End If
  
    If Len(Text1.Text) = 5 Then '当输入等于5个字符时
      If KeyAscii = 13 Then '回车键
            If Text1.Text = Adodc1.Recordset.Fields(2).Value Then   '密码相符
               Unload Formentry
               Exit Sub
            Else
               MsgBox "密码不符,请重新输入", vbOKOnly, "警示"
               Text1.SetFocus
            End If
      Else
        If KeyAscii <> 8 Then '回撤键
          KeyAscii = 0
        End If
      End If
    End If
    
    If Len(Text1.Text) > 5 Then '当输入大于5个字时
    KeyAscii = 0 '取消输入
    End If
  
Else
    KeyAscii = 0
End If
End Sub

Private Sub Timer1_Timer()
LED1.LEDSTRING = Now()
LED1.LEDWIDTH = 1
LED1.LEDXYRATE = 0.5
LED1.LEDSIZE = 90
End Sub

⌨️ 快捷键说明

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