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

📄 frmlogin.frm

📁 图书馆借书查询管理系统向用户提供的服务将在传统的“采->编->借->查”的基础上
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmlogin 
   Caption         =   "frmlogin"
   ClientHeight    =   2895
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4380
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   Picture         =   "frmlogin.frx":0000
   ScaleHeight     =   2895
   ScaleWidth      =   4380
   StartUpPosition =   2  '屏幕中心
   Begin VB.TextBox txtname 
      BackColor       =   &H00FFFFC0&
      Height          =   375
      Left            =   1680
      TabIndex        =   3
      Top             =   480
      Width           =   1575
   End
   Begin VB.TextBox txtpassword 
      BackColor       =   &H00FFFFC0&
      Height          =   375
      IMEMode         =   3  'DISABLE
      Left            =   1680
      PasswordChar    =   "*"
      TabIndex        =   2
      Top             =   1320
      Width           =   1575
   End
   Begin VB.CommandButton cmdlogin 
      BackColor       =   &H00FFFFC0&
      Caption         =   "登录 "
      Height          =   375
      Left            =   600
      Style           =   1  'Graphical
      TabIndex        =   1
      Top             =   2160
      Width           =   855
   End
   Begin VB.CommandButton cmdcancel 
      BackColor       =   &H00FFFFC0&
      Caption         =   "取消"
      Height          =   375
      Left            =   2160
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   2160
      Width           =   975
   End
   Begin VB.Label lblname 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   600
      TabIndex        =   5
      Top             =   600
      Width           =   1200
   End
   Begin VB.Label lblpassword 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "用户密码:"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   360
      TabIndex        =   4
      Top             =   1320
      Width           =   1500
   End
End
Attribute VB_Name = "frmlogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer

Private Sub cmdcancel_Click()
       End ' 退出
End Sub

Private Sub cmdlogin_Click()
    i = i + 1  '记录登陆次数
    If txtname.Text = "管理员" Then
        If txtpassword.Text = "555" Then '判断输入输入是否正确
           frmstart.Show '如果输入正确即显示主界面并隐藏登陆框
           Unload Me
           strName = Trim(txtname.Text)
        Else
           MsgBox "密码不正确!", , "登录失败" '没有输入密码的时候显示对话框
           If i = 3 Then '只能登陆3次
              End
           End If
              txtpassword.Text = ""
              txtpassword.SetFocus
        End If
    Else
         MsgBox "请输入正确的用户名!", , "登录失败" '没有输入用户名字的时候显示对话框
         txtpassword.Text = ""
         txtpassword.SetFocus
   End If
End Sub

Private Sub Form_Load()
        frmlogin.Caption = "登录"
End Sub

⌨️ 快捷键说明

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