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

📄 form1.frm

📁 里面包括图书馆的基本功能
💻 FRM
字号:
VERSION 5.00
Begin VB.Form UserLogin 
   BackColor       =   &H80000018&
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "用户登录"
   ClientHeight    =   7605
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   10875
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   Picture         =   "Form1.frx":0000
   ScaleHeight     =   7605
   ScaleWidth      =   10875
   ShowInTaskbar   =   0   'False
   StartUpPosition =   2  'CenterScreen
   Begin VB.CommandButton Command1 
      BackColor       =   &H00FFC0C0&
      Caption         =   "图书查询(适合普通用户)"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1395
      Left            =   3480
      Style           =   1  'Graphical
      TabIndex        =   7
      Top             =   4560
      Width           =   4395
   End
   Begin VB.CommandButton cmdCancel_Click 
      BackColor       =   &H00FFC0C0&
      Caption         =   "取消"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   6960
      Style           =   1  'Graphical
      TabIndex        =   6
      Top             =   2880
      Width           =   1935
   End
   Begin VB.CommandButton cmdOK_Click 
      BackColor       =   &H00FFC0C0&
      Cancel          =   -1  'True
      Caption         =   "确定"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   15.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1095
      Left            =   2520
      MaskColor       =   &H0080FF80&
      Style           =   1  'Graphical
      TabIndex        =   5
      Top             =   2880
      Width           =   2175
   End
   Begin VB.TextBox txtPassword 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   675
      IMEMode         =   3  'DISABLE
      Left            =   6960
      MaxLength       =   10
      PasswordChar    =   "*"
      TabIndex        =   4
      Top             =   1560
      Width           =   2295
   End
   Begin VB.TextBox txtUserName 
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   9.75
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   675
      Left            =   2040
      MaxLength       =   20
      TabIndex        =   2
      Top             =   1560
      Width           =   2295
   End
   Begin VB.Label Label3 
      BackColor       =   &H00FFFF80&
      BackStyle       =   0  'Transparent
      Caption         =   "密码:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   735
      Left            =   5160
      TabIndex        =   3
      Top             =   1560
      Width           =   1335
   End
   Begin VB.Label Label2 
      BackColor       =   &H00FFFF80&
      BackStyle       =   0  'Transparent
      Caption         =   "用户名:"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   14.25
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   735
      Index           =   0
      Left            =   480
      TabIndex        =   1
      Top             =   1560
      Width           =   1215
   End
   Begin VB.Label Label1 
      BackColor       =   &H00FFFF80&
      BackStyle       =   0  'Transparent
      Caption         =   "   欢迎使用高校图书馆管理系统"
      BeginProperty Font 
         Name            =   "隶书"
         Size            =   21.75
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Height          =   735
      Left            =   1440
      TabIndex        =   0
      Top             =   240
      Width           =   7095
   End
End
Attribute VB_Name = "UserLogin"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const MaxLogTimes As Integer = 3

Private Sub Command1_Click()
UserLogin.Hide
CommonUser.Show
End Sub

Private Sub cmdCancel_Click_Click()
If MsgBox("是否退出", vbYesNo, "登录验证") = vbYes Then
   Unload Me
End If
End Sub

Private Sub cmdOK_Click_Click()
 Static intLogTimes As Integer
 intLogTimes = intLogTimes + 1
 If intLogTimes > MaxLogTimes Then
     MsgBox "你超过了允许的登录次数" & vbCr_ & "应用程序将结束", vbCritical, "登录验证"
     End
 Else
    With Library_Manager.rsSysUser   '检验用户名密码的合法性
         .Open
         If .RecordCount > 0 Then
               .MoveFirst
               .Find ("用户名='" & Trim(txtUserName) & "'")
               If .EOF Then
                   MsgBox Trim(txtUserName) & "不是本系统用户", vbCritical, "登录验证"
                   txtUserName.SetFocus
                   txtUserName.SelStart = 0
                   txtUserName.SelLength = Len(txtUserName)
               ElseIf .Fields("密码") <> Trim(txtPassword) Then
                   MsgBox "密码错误,请重输", vbCritical, "登录验证"
                   txtPassword.SetFocus: txtPassword = ""
               Else
                   CurrentUserNum = .Fields("用户名")
                   CurrentUserPassword = .Fields("密码")
                   MsgBox "欢迎使用图书管理系统!", vbInformation, "登录成功"
                   Unload Me
                   Choose_Interface.Show
                End If
            End If
            .Close      '关闭记录集
    End With
End If
               
End Sub

Private Sub Command2_Click()

End Sub

⌨️ 快捷键说明

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