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

📄 frmlogin.frm

📁 图书管理系统,图书信息,添加学生信息,借书与归还记载,借书卡办理,查询图书信息
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmLogin 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "图书馆管理系统---登录"
   ClientHeight    =   3495
   ClientLeft      =   2835
   ClientTop       =   3480
   ClientWidth     =   6165
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2064.962
   ScaleMode       =   0  'User
   ScaleWidth      =   5788.601
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton cmdOK 
      Caption         =   "确定"
      Height          =   495
      Left            =   1200
      TabIndex        =   6
      Top             =   2640
      Width           =   1185
   End
   Begin VB.CommandButton cmdCancel 
      Cancel          =   -1  'True
      Caption         =   "取消"
      Height          =   495
      Left            =   3240
      TabIndex        =   5
      Top             =   2640
      Width           =   1185
   End
   Begin VB.Frame Frame1 
      Height          =   2055
      Left            =   720
      TabIndex        =   0
      Top             =   360
      Width           =   4575
      Begin VB.TextBox txtPassword 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   465
         IMEMode         =   3  'DISABLE
         Left            =   1785
         PasswordChar    =   "*"
         TabIndex        =   2
         Top             =   1200
         Width           =   2325
      End
      Begin VB.TextBox txtUserName 
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   15
            Charset         =   134
            Weight          =   700
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   465
         Left            =   1785
         TabIndex        =   1
         Top             =   600
         Width           =   2325
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         Caption         =   "密码(&P):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Index           =   1
         Left            =   480
         TabIndex        =   4
         Top             =   1320
         Width           =   840
      End
      Begin VB.Label lblLabels 
         AutoSize        =   -1  'True
         Caption         =   "用户名称(&U):"
         BeginProperty Font 
            Name            =   "宋体"
            Size            =   10.5
            Charset         =   134
            Weight          =   400
            Underline       =   0   'False
            Italic          =   0   'False
            Strikethrough   =   0   'False
         EndProperty
         Height          =   210
         Index           =   0
         Left            =   240
         TabIndex        =   3
         Top             =   720
         Width           =   1260
      End
   End
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Interval        =   90
      Left            =   960
      Top             =   4440
   End
End
Attribute VB_Name = "frmLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public LoginSucceeded As Boolean

Private Sub cmdCancel_Click()
    '设置全局变量为 false
    '不提示失败的登录
    LoginSucceeded = False
    Unload Me
End Sub

Private Sub cmdOK_Click()
    '检查正确的密码
    If txtPassword = "0" And txtUserName = "0" Then
        '将代码放在这里传递
        '成功到 calling 函数
        '设置全局变量时最容易的
        Timer1.Enabled = True
        Me.Hide
        frmzong.Show
        
        
    Else
        MsgBox "用户名或密码错误,请重试!", , "登录"
        txtPassword.SetFocus
        SendKeys "{Home}+{End}"
    End If
End Sub

Private Sub Command1_Click()

End Sub

Private Sub Timer1_Timer()
'7455
'8840
'6405
With frmzong
    If .Width < 15360 Then
        .Width = .Width + 1000
        .Height = .Height + 750
    Else
        Timer1.Enabled = False
        Unload Me
    End If
    .Move (Screen.Width - .Width) / 2, (Screen.Height - .Height) / 2
End With
End Sub


Private Sub txtPassword_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
Call cmdOK_Click
Else
End If
End Sub


Private Sub txtUserName_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 13 Then
 txtPassword.SetFocus
Else
End If
End Sub

⌨️ 快捷键说明

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