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

📄 frmlogin.frm

📁 人事管理系统
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登陆"
   ClientHeight    =   2985
   ClientLeft      =   30
   ClientTop       =   330
   ClientWidth     =   4665
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2985
   ScaleWidth      =   4665
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Tag             =   "Login"
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   360
      Left            =   2580
      TabIndex        =   4
      Tag             =   "Cancel"
      Top             =   2160
      Width           =   1140
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   360
      Left            =   732
      TabIndex        =   3
      Tag             =   "OK"
      Top             =   2160
      Width           =   1140
   End
   Begin VB.TextBox txtPassword 
      Height          =   288
      IMEMode         =   3  'DISABLE
      Left            =   1548
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1452
      Width           =   2325
   End
   Begin VB.TextBox txtUserName 
      Height          =   288
      Left            =   1548
      TabIndex        =   1
      Top             =   1056
      Width           =   2325
   End
   Begin VB.Label Label1 
      Caption         =   "人事管理信息系统"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H80000008&
      Height          =   495
      Left            =   720
      TabIndex        =   6
      Top             =   240
      Width           =   3855
   End
   Begin VB.Label lblLabels 
      Caption         =   "密码"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Index           =   1
      Left            =   348
      TabIndex        =   0
      Tag             =   "&Password:"
      Top             =   1464
      Width           =   1080
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   252
      Index           =   0
      Left            =   348
      TabIndex        =   5
      Tag             =   "&User Name:"
      Top             =   1080
      Width           =   1080
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False


Public OK As Boolean




Private Sub cmdCancel_Click()
    OK = False
    Me.Hide
End Sub


Private Sub cmdOK_Click()
    Dim mrc As ADODB.Recordset
    Dim strmsg As String
    txtSQL = "select uid from userinfo where UID='" & Trim(txtUserName.Text) & "'"
    Set mrc = ExecuteSQL(txtSQL, strmsg)
    If mrc.EOF = True Then
        MsgBox " 用户名错误!", vbExclamation + vbOKOnly, "警告"
        txtUserName.SetFocus
        txtUserName.SelStart = 0
        txtUserName.SelLength = Len(txtUserName.Text)
        Exit Sub
    End If
    UserName = mrc.Fields(0)
    txtSQL = "select UID from userinfo where PWD='" & Trim(txtPassword.Text) & "'"
    Set mrc = ExecuteSQL(txtSQL, strmsg)
    If mrc.EOF = True Then
        MsgBox " 密码错误!", vbExclamation + vbOKOnly, "警告"
        txtPassword.SetFocus
        txtPassword.SelStart = 0
        txtPassword.SelLength = Len(txtPassword.Text)
        Exit Sub
    End If
    OK = True
    frmMain.Show
    Unload Me
End Sub

⌨️ 快捷键说明

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