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

📄 frmlogin.frm

📁 物业管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "登录"
   ClientHeight    =   2835
   ClientLeft      =   2835
   ClientTop       =   3480
   ClientWidth     =   5085
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1675.012
   ScaleMode       =   0  'User
   ScaleWidth      =   4774.539
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtUserName 
      Height          =   255
      Left            =   1920
      TabIndex        =   1
      Top             =   1320
      Width           =   1965
   End
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Default         =   -1  'True
      Height          =   345
      Left            =   1200
      TabIndex        =   4
      Top             =   2160
      Width           =   1020
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   375
      Left            =   2640
      TabIndex        =   5
      Top             =   2160
      Width           =   1020
   End
   Begin VB.TextBox txtPassword 
      Height          =   270
      IMEMode         =   3  'DISABLE
      Left            =   1920
      PasswordChar    =   "*"
      TabIndex        =   3
      Top             =   1680
      Width           =   1965
   End
   Begin VB.Label Label1 
      Caption         =   "物业管理系统"
      BeginProperty Font 
         Name            =   "华文彩云"
         Size            =   26.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   615
      Left            =   960
      TabIndex        =   6
      Top             =   240
      Width           =   3375
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户名称"
      Height          =   270
      Index           =   0
      Left            =   1080
      TabIndex        =   0
      Top             =   1350
      Width           =   720
   End
   Begin VB.Label lblLabels 
      Caption         =   "用户密码"
      Height          =   225
      Index           =   1
      Left            =   1080
      TabIndex        =   2
      Top             =   1740
      Width           =   720
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim WithEvents rs As Recordset
Attribute rs.VB_VarHelpID = -1
Public OK As Boolean
' 确定当前时间
Dim nowdate As Date
'记录确定次数
Dim miCount As Integer
Dim response As Integer
Private Sub Form_Load()
    On Error Resume Next
    
    For Each TextBox In Me.Controls
        
    Next
    
    OK = False
    miCount = 0
    txtUserName.SetFocus
End Sub
Private Sub cmdCancel_Click()
    OK = False
    Me.Hide
End Sub
Private Sub cmdOK_Click()
    Dim txtSQL As String
    'ToDo: create test for correct password
    'check for correct password

    Username = ""
    If Trim(txtUserName.Text = "") Then
        MsgBox "没有这个用户,请重新输入用户名称!", vbOKOnly + vbExclamation, "警告"
        txtUserName.SetFocus
     Else
        txtSQL = "select * from 用户信息 where 用户名= '" & txtUserName.Text & "'"
        Set rs = db.Execute(txtSQL)
        If rs.EOF = True Then
            MsgBox "没有这个用户,请重新输入用户名称!", vbOKOnly + vbExclamation, "警告"
            txtUserName.SetFocus
        Else
        
          
                If Trim(rs.Fields(1)) = Trim(txtPassword.Text) Then
                  OK = True
                  rs.Close
                  Me.Hide
                  Username = Trim(txtUserName.Text)
                Else
                  MsgBox "输入密码不正确,请重新输入!", vbOKOnly + vbExclamation, "警告"
                  txtPassword.SetFocus
                  txtPassword.Text = ""
                End If
            End If
        End If
    
    miCount = miCount + 1
    If miCount = 3 Then
        Me.Hide
    End If
    Exit Sub
End Sub

⌨️ 快捷键说明

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