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

📄 main_mm.frm

📁 图书综合管理系统 VB毕业设计 原代码+论文
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form main_mm 
   BackColor       =   &H00C0C0C0&
   Caption         =   "图书综合管理系统"
   ClientHeight    =   3660
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   6150
   Icon            =   "main_mm.frx":0000
   LinkTopic       =   "Form1"
   ScaleHeight     =   3660
   ScaleWidth      =   6150
   StartUpPosition =   1  '所有者中心
   Begin MSAdodcLib.Adodc Adodc1 
      Height          =   330
      Left            =   -45
      Top             =   1830
      Visible         =   0   'False
      Width           =   1995
      _ExtentX        =   3519
      _ExtentY        =   582
      ConnectMode     =   0
      CursorLocation  =   3
      IsolationLevel  =   -1
      ConnectionTimeout=   15
      CommandTimeout  =   30
      CursorType      =   3
      LockType        =   3
      CommandType     =   1
      CursorOptions   =   0
      CacheSize       =   50
      MaxRecords      =   0
      BOFAction       =   0
      EOFAction       =   0
      ConnectStringType=   3
      Appearance      =   1
      BackColor       =   -2147483643
      ForeColor       =   -2147483640
      Orientation     =   0
      Enabled         =   -1
      Connect         =   "DSN=NBooks"
      OLEDBString     =   ""
      OLEDBFile       =   ""
      DataSourceName  =   "NBooks"
      OtherAttributes =   ""
      UserName        =   ""
      Password        =   ""
      RecordSource    =   "select * from qxb"
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   15
      Top             =   1035
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   32
      ImageHeight     =   32
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   10
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":000C
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":0EE8
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":17C4
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":20A0
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":23BC
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":2C98
            Key             =   ""
         EndProperty
         BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":3574
            Key             =   ""
         EndProperty
         BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":3E50
            Key             =   ""
         EndProperty
         BeginProperty ListImage9 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":472C
            Key             =   ""
         EndProperty
         BeginProperty ListImage10 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "main_mm.frx":5008
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin VB.TextBox Txttime 
      Height          =   270
      Left            =   -60
      TabIndex        =   10
      Top             =   2205
      Visible         =   0   'False
      Width           =   900
   End
   Begin MSComctlLib.ListView ListView1 
      Height          =   2265
      Left            =   135
      TabIndex        =   7
      Top             =   465
      Width           =   5835
      _ExtentX        =   10292
      _ExtentY        =   3995
      LabelWrap       =   -1  'True
      HideSelection   =   -1  'True
      _Version        =   393217
      Icons           =   "ImageList1"
      ForeColor       =   -2147483640
      BackColor       =   -2147483643
      BorderStyle     =   1
      Appearance      =   1
      NumItems        =   0
   End
   Begin VB.Frame Frame1 
      Height          =   45
      Left            =   150
      TabIndex        =   6
      Top             =   375
      Width           =   5880
   End
   Begin VB.CommandButton CmdEnd 
      BackColor       =   &H00C0C0C0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   4635
      Picture         =   "main_mm.frx":532C
      Style           =   1  'Graphical
      TabIndex        =   2
      Top             =   3150
      Width           =   1350
   End
   Begin VB.CommandButton CmdOk 
      BackColor       =   &H00C0C0C0&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   10.5
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   400
      Left            =   3285
      MaskColor       =   &H00FF8080&
      Picture         =   "main_mm.frx":6CE6
      Style           =   1  'Graphical
      TabIndex        =   0
      Top             =   3150
      UseMaskColor    =   -1  'True
      Width           =   1350
   End
   Begin VB.TextBox Text1 
      BackColor       =   &H00FFFF00&
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   315
      IMEMode         =   3  'DISABLE
      Left            =   915
      MaxLength       =   6
      PasswordChar    =   "*"
      TabIndex        =   1
      Top             =   3210
      Width           =   1965
   End
   Begin VB.Label jb 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   4530
      TabIndex        =   11
      Top             =   2835
      Width           =   1560
   End
   Begin VB.Label bh 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   2550
      TabIndex        =   9
      Top             =   2835
      Width           =   795
   End
   Begin VB.Label czy 
      BackStyle       =   0  'Transparent
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   930
      TabIndex        =   8
      Top             =   2835
      Width           =   960
   End
   Begin VB.Label Label3 
      BackStyle       =   0  'Transparent
      Caption         =   "在下面选择用来登录的身份:"
      Height          =   225
      Left            =   180
      TabIndex        =   5
      Top             =   90
      Width           =   2955
   End
   Begin VB.Label Label2 
      BackStyle       =   0  'Transparent
      Caption         =   "密  码:         "
      Height          =   300
      Left            =   195
      TabIndex        =   4
      Top             =   3270
      Width           =   855
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "操作员:            编号:          操作员级别:            "
      Height          =   195
      Left            =   210
      TabIndex        =   3
      Top             =   2835
      Width           =   4500
   End
End
Attribute VB_Name = "main_mm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim itmX As ListItem   '声明一个ListItem对象
Dim MyIcon As Integer    '声明一个整型变量
Dim text, MyMsg As String  '声明字符串变量
Private Sub Form_Activate()
 Text1.SetFocus     'text1获得焦点
End Sub
Private Sub Form_Load()
'添加操作员
 Adodc1.RecordSource = "select * from qxb"
 Adodc1.Refresh
 If Adodc1.Recordset.RecordCount > 0 Then
   With Adodc1.Recordset
        .MoveFirst
        czy.Caption = .Fields("操作员")
        bh.Caption = .Fields("编号")
        jb.Caption = .Fields("操作员级别")
        Do While .EOF = False
           text = .Fields("操作员")
           MyIcon = Val(Right(.Fields("头像"), Val(Len(.Fields("头像")) - 2)))
           Set itmX = ListView1.ListItems.Add(, , text, MyIcon)
           .MoveNext
        Loop
   End With
  End If
End Sub
Private Sub ListView1_Click()
 If ListView1.ListItems.Count > 0 Then
   '查询操作员信息
   Adodc1.RecordSource = "select * from qxb where 操作员='" + ListView1.SelectedItem + "'"
   Adodc1.Refresh
   With Adodc1.Recordset
        If .RecordCount > 0 Then
           '赋值给czy.caption等
           czy.Caption = .Fields("操作员")
           bh.Caption = .Fields("编号")
           If .Fields("操作员级别") <> "" Then jb.Caption = .Fields("操作员级别")
        End If
   End With
 End If
End Sub
Private Sub Text1_KeyDown(KeyCode As Integer, Shift As Integer)
 '回车使CmdOk按钮获得焦点
 If KeyCode = vbKeyReturn Then CmdOk.SetFocus
End Sub
Private Sub cmdOK_Click()
 Adodc1.RecordSource = "select * from qxb where 操作员 = '" + Trim(czy.Caption) + "'"
 Adodc1.Refresh
 If Adodc1.Recordset.RecordCount > 0 Then
    With Adodc1.Recordset
         frm_main.jcxxgl.Enabled = .Fields("基础信息管理")
         frm_main.Toolbar1.Buttons(1).Enabled = .Fields("基础信息管理")
         frm_main.tsgl.Enabled = .Fields("图书管理")
         frm_main.Toolbar1.Buttons(5).Enabled = .Fields("图书管理")
         frm_main.Toolbar1.Buttons(11).Enabled = .Fields("图书管理")
         frm_main.jygl.Enabled = .Fields("借阅管理")
         frm_main.Toolbar1.Buttons(7).Enabled = .Fields("借阅管理")
         frm_main.Toolbar1.Buttons(9).Enabled = .Fields("借阅管理")
         frm_main.jcfx.Enabled = .Fields("决策分析")
         frm_main.xtwh.Enabled = .Fields("系统维护")
         frm_main.xtgl.Enabled = .Fields("系统管理")
         frm_main.Toolbar1.Buttons(13).Enabled = .Fields("系统管理")
    End With
    '验证操作员及密码
    If Text1.text = Adodc1.Recordset.Fields("密码") Then
       Load frm_main
       frm_main.Show
       frm_main.St1.Panels(3).text = czy.Caption
       Unload Me
     Else
       If czy.Caption = "" Then
          MsgBox ("请选择操作员!")
          ListView1.SetFocus
        Else
          If Text1.text <> Adodc1.Recordset.Fields("密码") Then
             MsgBox ("密码错误,请重新输入密码!")
             Txttime.text = Val(Txttime.text) + 1
             Text1.SetFocus
          End If
       End If
       If Txttime.text = "3" Then     '密码错误3次,退出系统
          MyMsg = MsgBox("密码输入错误,请向系统管理员查询!", , "")
          If MyMsg = vbOK Then End
       End If
    End If
 End If
End Sub
Private Sub CmdEnd_Click()
 End
End Sub

⌨️ 快捷键说明

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