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

📄 frmsb.frm

📁 这个软件可以通过短信猫收发短信。可以用做短信平台。功能十分强大!
💻 FRM
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form FrmSB 
   Caption         =   "上班"
   ClientHeight    =   3345
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4230
   FillColor       =   &H00E0E0E0&
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3345
   ScaleWidth      =   4230
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox TxtUsr 
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   360
      Left            =   1710
      MaxLength       =   7
      TabIndex        =   1
      Text            =   "0000000"
      Top             =   1380
      Width           =   1080
   End
   Begin VB.TextBox TxtPwd 
      BeginProperty Font 
         Name            =   "黑体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   360
      IMEMode         =   3  'DISABLE
      Left            =   1740
      MaxLength       =   10
      PasswordChar    =   "*"
      TabIndex        =   0
      Text            =   "1111111123"
      Top             =   2220
      Width           =   1470
   End
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   375
      Left            =   1110
      Top             =   480
      Visible         =   0   'False
      Width           =   1935
      _ExtentX        =   3413
      _ExtentY        =   661
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   8
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   1
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   ""
      OLEDBString     =   ""
      OLEDBFile       =   ""
      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.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "工号:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   240
      Index           =   0
      Left            =   870
      TabIndex        =   3
      Top             =   1440
      Width           =   720
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "口令:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H8000000D&
      Height          =   240
      Index           =   1
      Left            =   840
      TabIndex        =   2
      Top             =   2250
      Width           =   720
   End
End
Attribute VB_Name = "FrmSB"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim rst As ADODB.Recordset
Dim passwordcounter As String
Dim ii As Integer

Private Sub form_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
   If KeyCode = 27 Then
   If MsgBox(Chr(13) & "是否退出?" & Chr(13), 36 + 256, "欢迎您再次使用!") = vbYes Then
       Unload Me
   End If
   End If
   
End Sub

Private Sub Form_Load()
On Error Resume Next
    Left = (Screen.Width - Me.Width) / 2
    Top = (Screen.Height - Me.Height) / 2
    passwordcounter = 0
    TxtUsr = ""
    TxtPwd = ""
End Sub

Private Sub TxtPwd_GotFocus()
On Error Resume Next
   Set rst = New ADODB.Recordset
   rst.CursorLocation = adUseClient
   rst.Open "select * from userduty where 编号='" & Trim(TxtUsr.Text) & "'", adocn, adOpenDynamic, adLockOptimistic, adCmdText
   If rst.EOF Then
       MsgBox "该用户名无效,请输入正确的用户名.", , "用户名"
       TxtUsr.SetFocus
       TxtUsr = ""
   End If
   rst.Close
   Set rst = Nothing
End Sub

Private Sub TxtPwd_KeyDown(KeyCode As Integer, Shift As Integer)
On Error Resume Next
    If KeyCode = vbKeyReturn Then
       CmdOK_Click
    ElseIf KeyCode = 27 Then
        If MsgBox(Chr(13) & "是否退出?        " & Chr(13), 36 + 256, "欢迎您再次使用!") = vbYes Then
           Unload Me
        End If
    End If
End Sub

Private Sub CmdOK_Click()
On Error Resume Next
     passwordcounter = passwordcounter + 1
     Me.Caption = "正在检查用户..."
     If Len(TxtUsr.Text) = 0 Then
        MsgBox "请输入您的用户名.", , "错误"
        TxtUsr.SetFocus
     Else
        Set rst = New ADODB.Recordset
        rst.CursorLocation = adUseClient
        rst.Open "select * from userduty where 编号='" & Trim(TxtUsr.Text) & "'", adocn, adOpenDynamic, adLockOptimistic, adCmdText
        
           If rst.EOF Then
              MsgBox "该用户名无效,请输入正确的用户名.", , "用户名"
              rst.Close
              TxtUsr.SetFocus
           Else
              rst.Close
              rst.Open "select * from userduty where 编号='" & Trim(TxtUsr.Text) & "' and 密码='" & TxtPwd.Text & "'", adocn, adOpenDynamic, adLockOptimistic, adCmdText
              If rst.EOF Then
                    MsgBox "该密码无效,请输入正确的密码.", , "密码"
                    TxtPwd.SetFocus
                    TxtPwd.Text = ""
                    rst.Close
              Else
                    gUserName = Trim(rst![姓名])
                    gUserCode = Trim(rst![编号])
                    gUserpass = Trim(rst![密码])
                    gUserQX = Trim(rst![权限])
                    rst.Update
                    rst.Clone
                   Unload Me
              End If
           End If
        End If
                 
End Sub

⌨️ 快捷键说明

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