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

📄

📁 vb模拟 图书管理系统
💻
字号:
VERSION 5.00
Object = "{C1A8AF28-1257-101B-8FB0-0020AF039CA3}#1.1#0"; "MCI32.OCX"
Begin VB.Form 登陆 
   BorderStyle     =   1  'Fixed Single
   Caption         =   "图书馆管理系统"
   ClientHeight    =   3390
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   4455
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   3390
   ScaleWidth      =   4455
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command3 
      Caption         =   "重置"
      Height          =   375
      Left            =   1680
      TabIndex        =   7
      Top             =   2640
      Width           =   975
   End
   Begin MCI.MMControl MMControl1 
      Height          =   330
      Left            =   480
      TabIndex        =   9
      Top             =   3480
      Visible         =   0   'False
      Width           =   3540
      _ExtentX        =   6244
      _ExtentY        =   582
      _Version        =   393216
      DeviceType      =   ""
      FileName        =   ""
   End
   Begin VB.CommandButton Command2 
      Caption         =   "取消"
      Height          =   375
      Left            =   2880
      TabIndex        =   8
      Top             =   2640
      Width           =   975
   End
   Begin VB.CommandButton Command1 
      Caption         =   "登陆"
      Height          =   375
      Left            =   480
      TabIndex        =   6
      Top             =   2640
      Width           =   975
   End
   Begin VB.Frame Frame1 
      Caption         =   "用户登陆"
      Height          =   1335
      Left            =   480
      TabIndex        =   1
      Top             =   1080
      Width           =   3375
      Begin VB.TextBox Text2 
         Height          =   270
         IMEMode         =   3  'DISABLE
         Left            =   1320
         PasswordChar    =   "*"
         TabIndex        =   5
         Text            =   "guest"
         Top             =   720
         Width           =   1575
      End
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   1320
         TabIndex        =   4
         Text            =   "guest"
         Top             =   240
         Width           =   1575
      End
      Begin VB.Label Label3 
         Caption         =   "命  令"
         Height          =   255
         Left            =   480
         TabIndex        =   3
         Top             =   720
         Width           =   615
      End
      Begin VB.Label Label2 
         Caption         =   "用户名"
         Height          =   255
         Left            =   480
         TabIndex        =   2
         Top             =   360
         Width           =   615
      End
   End
   Begin VB.Label Label1 
      Caption         =   "图书馆管理系统"
      BeginProperty Font 
         Name            =   "华文行楷"
         Size            =   26.25
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H000000FF&
      Height          =   615
      Left            =   360
      TabIndex        =   0
      Top             =   240
      Width           =   3855
   End
End
Attribute VB_Name = "登陆"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Public n As Integer

Private Sub Command1_Click()
Dim mrc As ADODB.Recordset
txtsql = "select * from oper where 用户名='" & _
Trim$(Text1.Text) & "' and 口令='" & Trim$(Text2.Text) + "'"
Set mrc = exesql(txtsql)
If mrc.RecordCount = 0 Then '未找到用户记录
n = n + 1
If n < 3 Then
MsgBox "没有这个用户,继续登陆", vbOKOnly + vbExclamation, "信息提示"
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
Else
MsgBox "已登陆失败三次,退出系统", vbOKOnly + vbExclamation, "信息提示"
mrc.Close
Unload Me
End If
Else '找到合法用户记录
userlevel = Trim(mrc.Fields("级别"))
mrc.Clone
Unload Me
菜单.Show '调用menu窗体
End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Command3_Click()
Text1.Text = ""
Text2.Text = ""
Text1.SetFocus
End Sub

Private Sub Form_Load()
n = 0 'n保存登陆的次数
End Sub

Private Sub Text1_KeyPress(KeyAscii As Integer)
Call endata(KeyAscii)
End Sub

⌨️ 快捷键说明

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