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

📄 主界面.frm

📁 vb+access 我专科毕业时候的毕业设计
💻 FRM
字号:
VERSION 5.00
Begin VB.Form 主界面 
   Caption         =   "图书馆管理系统"
   ClientHeight    =   6615
   ClientLeft      =   165
   ClientTop       =   555
   ClientWidth     =   9345
   LinkTopic       =   "Form1"
   ScaleHeight     =   6615
   ScaleWidth      =   9345
   StartUpPosition =   2  '屏幕中心
   Begin VB.Frame Frame2 
      Caption         =   "读者所借书籍"
      Height          =   3255
      Left            =   3840
      TabIndex        =   10
      Top             =   2160
      Width           =   5295
      Begin VB.TextBox Text6 
         Height          =   2655
         Left            =   600
         MultiLine       =   -1  'True
         TabIndex        =   17
         Top             =   360
         Width           =   4335
      End
   End
   Begin VB.TextBox Text5 
      Height          =   375
      Left            =   1440
      TabIndex        =   13
      Top             =   4440
      Width           =   2055
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1440
      TabIndex        =   12
      Top             =   3480
      Width           =   2055
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1440
      TabIndex        =   11
      Top             =   2640
      Width           =   2055
   End
   Begin VB.TextBox Text2 
      Height          =   300
      Left            =   3720
      MousePointer    =   3  'I-Beam
      TabIndex        =   9
      Top             =   1680
      Width           =   2535
   End
   Begin VB.CommandButton Command2 
      Caption         =   "go"
      Default         =   -1  'True
      Height          =   300
      Left            =   6240
      TabIndex        =   8
      Top             =   1680
      Width           =   735
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      ItemData        =   "主界面.frx":0000
      Left            =   1200
      List            =   "主界面.frx":0016
      TabIndex        =   6
      Top             =   1680
      Width           =   2535
   End
   Begin VB.Frame Frame1 
      Caption         =   "操作信息"
      Height          =   975
      Left            =   0
      TabIndex        =   4
      Top             =   5520
      Width           =   9375
      Begin VB.TextBox Text1 
         Height          =   270
         Left            =   360
         TabIndex        =   5
         Top             =   360
         Width           =   8295
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退出"
      Height          =   1215
      Index           =   3
      Left            =   6360
      TabIndex        =   3
      TabStop         =   0   'False
      Top             =   0
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   " 借阅/还书"
      Height          =   1215
      Index           =   2
      Left            =   4680
      TabIndex        =   2
      TabStop         =   0   'False
      Top             =   0
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "读者管理"
      Height          =   1215
      Index           =   1
      Left            =   3000
      TabIndex        =   1
      TabStop         =   0   'False
      Top             =   0
      Width           =   1695
   End
   Begin VB.CommandButton Command1 
      Caption         =   "书籍管理"
      Height          =   1215
      Index           =   0
      Left            =   1320
      TabIndex        =   0
      TabStop         =   0   'False
      Top             =   0
      Width           =   1695
   End
   Begin VB.Label Label4 
      Height          =   375
      Left            =   240
      TabIndex        =   16
      Top             =   4440
      Width           =   975
   End
   Begin VB.Label Label3 
      Height          =   375
      Left            =   240
      TabIndex        =   15
      Top             =   3480
      Width           =   975
   End
   Begin VB.Label Label2 
      Height          =   375
      Left            =   240
      TabIndex        =   14
      Top             =   2640
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "精确查询"
      Height          =   255
      Left            =   120
      TabIndex        =   7
      Top             =   1680
      Width           =   1095
   End
   Begin VB.Menu mdd 
      Caption         =   "文件"
      Begin VB.Menu exit 
         Caption         =   "退出"
      End
   End
   Begin VB.Menu mbb 
      Caption         =   "编辑"
      Begin VB.Menu 设置 
         Caption         =   "设置"
      End
   End
   Begin VB.Menu hpp 
      Caption         =   "帮助"
      Begin VB.Menu gy 
         Caption         =   "关于"
      End
   End
End
Attribute VB_Name = "主界面"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Combo1_Click()
Text2.Text = ""
Text2.SetFocus
End Sub

Private Sub Command1_Click(Index As Integer)
Select Case Index
 Case 0
  书籍管理.Show
 Case 1
  读者管理.Show
 Case 2
  借阅.Show
 Case 3
  m = MsgBox("确认退出?", vbOKCancel, "图书馆管理系统")
  If m = 1 Then Unload Me
End Select

End Sub

Private Sub Command2_Click()
Text6.Text = ""
If Text2.Text = "" Or Combo1.Text = "" Then
   MsgBox ("该项不能为空")
   Text2.SetFocus
Else
Set db = OpenDatabase(App.Path & "\图书001")

  If Combo1.Text = Combo1.List(0) Then
        Set rs = db.OpenRecordset("select * from 图书 where 图书名称 = '" & Trim(Text2.Text) & "'")
  End If
  If Combo1.Text = Combo1.List(1) Then
        Set rs = db.OpenRecordset("select * from 读者 where 读者姓名 ='" & Trim(Text2.Text) & "'")
  End If
  If Combo1.Text = Combo1.List(2) Then
        Set rs = db.OpenRecordset("select * from 图书 where 图书编号 ='" & Trim(Text2.Text) & "'")
  End If
  If Combo1.Text = Combo1.List(3) Then
        Set rs = db.OpenRecordset("select * from 图书 where 作者 = '" & Trim(Text2.Text) & "'")
  End If
  If Combo1.Text = Combo1.List(4) Then
        Set rs = db.OpenRecordset("select * from 读者 where 借书证编号 = '" & Trim(Text2.Text) & "'")
  End If
  If Combo1.Text = Combo1.List(5) Then
        Set rs = db.OpenRecordset("select * from 图书 where 出版社 = '" & Trim(Text2.Text) & "'")
  End If
  
  If rs.EOF = True And rs.BOF = True Then
         MsgBox ("sorry 查找失败!")
         Text2.Text = ""
  Else
    If Combo1.Text = Combo1.List(1) Or Combo1.Text = Combo1.List(4) Then

        Label2.Caption = " 读者姓名"
        Label3.Caption = "借书证编号"
        Label4.Caption = "当前借书量"
        Text3.Text = rs.读者姓名
        Text4.Text = rs.借书证编号
        Text5.Text = rs.当前借书量
        Set rs1 = db.OpenRecordset("select * from 图书 where 状态 = '" & Text4.Text & "'")
        Dim s As String
        s = ""
            For t = 0 To Val(rs1.RecordCount) - 1
                s = s + "图书名称: " + rs1.图书名称 + vbCrLf
            Next t
            Text6.Text = s
        rs1.Close
    Else
        Label2.Caption = "图书名称"
        Label3.Caption = "图书编号"
        Label4.Caption = "状态"
        Text3.Text = rs.图书名称
        Text4.Text = rs.图书编号
        If rs.状态 <> "在馆" Then
            Text5.Text = "借出"
        Else
            Text5.Text = rs.状态
        End If
    End If
    rs.Close
 End If

 Text1.Text = "查询成功"
End If
          
End Sub

Private Sub exit_Click()
m = MsgBox("确认退出?", vbOKCancel, "图书馆管理系统")
If m = 1 Then End
End Sub

Private Sub Form_Load()
Combo1.Text = Combo1.List(1)
End Sub

Private Sub Frame3_DragDrop(Source As Control, X As Single, Y As Single)

End Sub

Private Sub gy_Click()
关于.Show
End Sub

Private Sub 设置_Click()
P设置.Show
End Sub

⌨️ 快捷键说明

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