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

📄 mdiform1.frm

📁 以前上传过的一个图书馆管理系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm MDIMain 
   AutoShowChildren=   0   'False
   BackColor       =   &H8000000C&
   Caption         =   "雪蝶图书馆管理系统"
   ClientHeight    =   8310
   ClientLeft      =   165
   ClientTop       =   -255
   ClientWidth     =   11880
   Icon            =   "MDIForm1.frx":0000
   LinkTopic       =   "MDIForm1"
   Moveable        =   0   'False
   StartUpPosition =   2  '屏幕中心
   WindowState     =   2  'Maximized
   Begin MSComctlLib.StatusBar StatusBar1 
      Align           =   2  'Align Bottom
      Height          =   375
      Left            =   0
      TabIndex        =   0
      Top             =   7935
      Width           =   11880
      _ExtentX        =   20955
      _ExtentY        =   661
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   8
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Object.Width           =   4022
            Picture         =   "MDIForm1.frx":08CA
            Text            =   "雪蝶图书馆管理系统"
            TextSave        =   "雪蝶图书馆管理系统"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Picture         =   "MDIForm1.frx":11A6
            Text            =   "当前管理员:"
            TextSave        =   "当前管理员:"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   1
            Object.Width           =   6059
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   1
            Enabled         =   0   'False
            Object.Width           =   1059
            MinWidth        =   1059
            TextSave        =   "CAPS"
         EndProperty
         BeginProperty Panel5 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   2
            Object.Width           =   1058
            MinWidth        =   1058
            TextSave        =   "NUM"
         EndProperty
         BeginProperty Panel6 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            AutoSize        =   2
            Object.Width           =   1588
            MinWidth        =   1588
            TextSave        =   "05-2-11"
         EndProperty
         BeginProperty Panel7 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            AutoSize        =   2
            Object.Width           =   1402
            MinWidth        =   1411
            TextSave        =   "16:33"
         EndProperty
         BeginProperty Panel8 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            AutoSize        =   2
            Text            =   "版权所有 吴燕"
            TextSave        =   "版权所有 吴燕"
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   855
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   11880
      _ExtentX        =   20955
      _ExtentY        =   1508
      ButtonWidth     =   1614
      ButtonHeight    =   1349
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   5
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "读者登记"
            Key             =   "userregedit"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "读者一览"
            Key             =   "usersearch"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "图书登记"
            Key             =   "bookregedit"
            ImageIndex      =   6
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "图书一览"
            Key             =   "booksearch"
            ImageIndex      =   7
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "借阅/归还"
            ImageIndex      =   8
         EndProperty
      EndProperty
      Begin VB.PictureBox Picture1 
         Height          =   15
         Left            =   0
         ScaleHeight     =   15
         ScaleWidth      =   12015
         TabIndex        =   2
         Top             =   840
         Width           =   12015
      End
      Begin MSComctlLib.ImageList ImageList1 
         Left            =   8880
         Top             =   120
         _ExtentX        =   1005
         _ExtentY        =   1005
         BackColor       =   -2147483643
         ImageWidth      =   32
         ImageHeight     =   32
         MaskColor       =   12632256
         _Version        =   393216
         BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
            NumListImages   =   8
            BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":1542
               Key             =   ""
            EndProperty
            BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":1E1E
               Key             =   ""
            EndProperty
            BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":21BA
               Key             =   ""
            EndProperty
            BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":2ECA
               Key             =   ""
            EndProperty
            BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":37A6
               Key             =   ""
            EndProperty
            BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":5F5A
               Key             =   ""
            EndProperty
            BeginProperty ListImage7 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":71DE
               Key             =   ""
            EndProperty
            BeginProperty ListImage8 {2C247F27-8591-11D1-B16A-00C0F0283628} 
               Picture         =   "MDIForm1.frx":7ABA
               Key             =   ""
            EndProperty
         EndProperty
      End
   End
   Begin VB.Menu numfile 
      Caption         =   "文件(&F)"
      Enabled         =   0   'False
      Begin VB.Menu mnubackup 
         Caption         =   "备份数据库"
         Enabled         =   0   'False
      End
      Begin VB.Menu numexport 
         Caption         =   "导出"
         Enabled         =   0   'False
      End
      Begin VB.Menu mnuprintset 
         Caption         =   "打印设置"
      End
   End
   Begin VB.Menu mnu_manager 
      Caption         =   "管理员信息(&M)"
      Begin VB.Menu mnu_manager_reg 
         Caption         =   "管理员注册"
      End
      Begin VB.Menu mnu_manager_edit 
         Caption         =   "管理员查询"
      End
   End
   Begin VB.Menu mnu_user_info 
      Caption         =   "读者信息(&U)"
      Begin VB.Menu mnu_user_check 
         Caption         =   "读者登记"
      End
      Begin VB.Menu mnu_user_modify 
         Caption         =   "读者修改"
      End
      Begin VB.Menu mnu_user_search 
         Caption         =   "读者查询"
      End
   End
   Begin VB.Menu mnu_book_info 
      Caption         =   "图书信息(&B)"
      Begin VB.Menu mnu_book_check 
         Caption         =   "图书登记"
      End
      Begin VB.Menu mnu_book_modify 
         Caption         =   "图书修改"
      End
      Begin VB.Menu mnu_book_search 
         Caption         =   "图书查询"
      End
      Begin VB.Menu mnu_book_borrow 
         Caption         =   "图书借阅/归还"
      End
   End
   Begin VB.Menu mnutools 
      Caption         =   "工具(&T)"
      Begin VB.Menu mnucalc 
         Caption         =   "计算器"
      End
   End
   Begin VB.Menu mnu_relogin 
      Caption         =   "重新登录(&R)"
   End
   Begin VB.Menu mnu_about 
      Caption         =   "关于(&A)"
   End
   Begin VB.Menu mnuhelp 
      Caption         =   "帮助(&H)"
   End
   Begin VB.Menu mnu_exit 
      Caption         =   "退出(&E)"
   End
End
Attribute VB_Name = "MDIMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim exit_state As String
Private Sub MDIForm_Load()
'Image1.Picture = LoadPicture(App.Path + "\image\library.jpg")
If rds_manager.Fields(0) = "admin" Then
    mnu_manager_reg.Enabled = True '注册新管理员
    mnu_manager_edit.Enabled = True '管理员一览
Else
    mnu_manager_reg.Enabled = False
    mnu_manager_edit.Enabled = False
End If
If rds_manager.Fields("MANAGER_USER") Then
    mnu_user_info.Enabled = True '读者管理
    Toolbar1.Buttons(1).Enabled = True
    Toolbar1.Buttons(2).Enabled = True
Else
    mnu_user_info.Enabled = False
    Toolbar1.Buttons(1).Enabled = False
    Toolbar1.Buttons(2).Enabled = False
End If
If rds_manager.Fields("MANAGER_BOOK") Then
    mnu_book_info.Enabled = True '图书管理
    Toolbar1.Buttons(3).Enabled = True
    Toolbar1.Buttons(4).Enabled = True
    Toolbar1.Buttons(5).Enabled = True
Else
    mnu_book_info.Enabled = False
    Toolbar1.Buttons(3).Enabled = False
    Toolbar1.Buttons(4).Enabled = False
    Toolbar1.Buttons(5).Enabled = False
End If
End Sub

Private Sub MDIForm_Unload(Cancel As Integer)
exit_state = MsgBox("确认要退出本系统吗?", vbOKCancel)
If exit_state = vbCancel Then Cancel = 1
End Sub
Private Sub mnu_manager_reg_Click()
Frmmanager_regedit.Tag = "regedit"
Frmmanager_regedit.Show vbModal
End Sub
Private Sub mnu_manager_edit_Click()
frmmanager_list.Show vbModal
End Sub

Private Sub mnu_relogin_Click()
Unload Me
If exit_state = vbOK Then frmLogin.Show vbModal

End Sub

Private Sub mnu_user_check_Click()
frmuser_check.Tag = "check"
frmuser_check.Show vbModal

End Sub

Private Sub mnu_user_modify_Click()
Dim uid As String
uid = InputBox("请输入读者编号", "读者信息修改")
If uid = "" Then Exit Sub
If rds_user.State = adStateOpen Then rds_user.Close
rds_user.Open "select * from 读者信息 where USER_ID='" + uid + "'", myconn, adOpenKeyset, adLockOptimistic, 1
If rds_user.Fields(0) = "" Then MsgBox "该读者不存在": Exit Sub
frmuser_check.Tag = "modify"
frmuser_check.txt_user(0).Enabled = False
Dim i As Integer
    For i = 0 To 5
        If i <> 2 Then frmuser_check.txt_user(i) = rds_user.Fields(i)
        If i = 3 Then frmuser_check.txt_user(3).Tag = rds_user.Fields(i)
    Next i
    '性别
    If rds_user.Fields(2) = "男" Then
        frmuser_check.Option1(0).Value = 1
    Else
        frmuser_check.Option1(1).Value = 1
    End If
On Error GoTo err1:
    frmuser_check.Image1.Picture = LoadPicture(rds_user.Fields(6))
    frmuser_check.CommonDialog1.FileName = rds_user.Fields(6)
    '登记日期
    frmuser_check.lbl_CHECK_DATE = rds_user.Fields(7)
    rds_user.Close
    frmuser_check.Show vbModal
Exit Sub
err1:
    MsgBox "相片加载错误,请检查路径" + Mid(Err.Description, 7), vbCritical: Resume Next

End Sub

Private Sub mnu_user_search_Click()
frmuser_search.Show
End Sub
Private Sub mnu_book_check_Click()
frmbook_check.Tag = "check"
frmbook_check.Show vbModal
End Sub

Private Sub mnu_book_modify_Click()
Dim i As Integer
Dim bid As String
'Debug.Print "frmbook_check.Tag:"; frmbook_check.Tag
bid = InputBox("请输入图书编号", "图书信息修改")
If bid = "" Then Exit Sub
With rds_book
    If .State = adStateOpen Then .Close
    .Open "select * from 图书信息 where BOOK_ID='" + bid + "'", myconn, adOpenKeyset, adLockPessimistic, adCmdText
If rds_book.Fields(0) = "" Then MsgBox "该图书不存在": Exit Sub
    For i = 0 To 8
        If i <> 3 And Not IsNull(.Fields(i)) Then
            frmbook_check.txt_book(i) = .Fields(i)
            'Debug.Print i
        ElseIf IsNull(.Fields(i)) Then
            frmbook_check.txt_book(i) = Date
        End If
    Next i
    frmbook_check.DTPicker1.Value = CDate(.Fields(3))
frmbook_check.Tag = "modify"
frmbook_check.txt_book(0).Enabled = False
frmbook_check.Show vbModal
End With
End Sub
Private Sub mnu_book_search_Click()
frmbook_search.Show
End Sub
Private Sub mnu_book_borrow_Click()
frmbook_borrow.Show vbModal
End Sub

Private Sub mnu_about_Click()
Frmabout.Show vbModal
End Sub
Private Sub mnu_exit_Click()
End
End Sub


Private Sub mnucalc_Click()
Shell "calc.exe"
End Sub

Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Select Case Button
Case "读者登记"
    Call mnu_user_check_Click
Case "读者一览"
    Call mnu_user_search_Click
Case "图书登记"
    Call mnu_book_check_Click
Case "图书一览"
    Call mnu_book_search_Click
Case "借阅/归还"
    Call mnu_book_borrow_Click
End Select

End Sub


⌨️ 快捷键说明

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