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

📄 frmmain.frm

📁 这是一个VB做的多功能图书借阅系统
💻 FRM
字号:
VERSION 5.00
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "MSCOMCTL.OCX"
Begin VB.MDIForm frmMain 
   AutoShowChildren=   0   'False
   BackColor       =   &H8000000C&
   Caption         =   "Library Management System"
   ClientHeight    =   4950
   ClientLeft      =   165
   ClientTop       =   855
   ClientWidth     =   8625
   Icon            =   "frmMain.frx":0000
   LinkTopic       =   "MDIForm1"
   StartUpPosition =   3  '窗口缺省
   WindowState     =   2  'Maximized
   Begin MSComctlLib.ImageList ImageList1 
      Left            =   1080
      Top             =   1920
      _ExtentX        =   1005
      _ExtentY        =   1005
      BackColor       =   -2147483643
      ImageWidth      =   45
      ImageHeight     =   45
      MaskColor       =   12632256
      _Version        =   393216
      BeginProperty Images {2C247F25-8591-11D1-B16A-00C0F0283628} 
         NumListImages   =   6
         BeginProperty ListImage1 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":0442
            Key             =   ""
         EndProperty
         BeginProperty ListImage2 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":1C7E
            Key             =   ""
         EndProperty
         BeginProperty ListImage3 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":34BA
            Key             =   ""
         EndProperty
         BeginProperty ListImage4 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":4CF6
            Key             =   ""
         EndProperty
         BeginProperty ListImage5 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":6532
            Key             =   ""
         EndProperty
         BeginProperty ListImage6 {2C247F27-8591-11D1-B16A-00C0F0283628} 
            Picture         =   "frmMain.frx":6986
            Key             =   ""
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.Toolbar Toolbar1 
      Align           =   1  'Align Top
      Height          =   1050
      Left            =   0
      TabIndex        =   1
      Top             =   0
      Width           =   8625
      _ExtentX        =   15214
      _ExtentY        =   1852
      ButtonWidth     =   1455
      ButtonHeight    =   1693
      Appearance      =   1
      ImageList       =   "ImageList1"
      _Version        =   393216
      BeginProperty Buttons {66833FE8-8583-11D1-B16A-00C0F0283628} 
         NumButtons      =   10
         BeginProperty Button1 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "图书信息"
            ImageIndex      =   1
         EndProperty
         BeginProperty Button2 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "读者信息"
            ImageIndex      =   3
         EndProperty
         BeginProperty Button3 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button4 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button5 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "借书"
            ImageIndex      =   2
         EndProperty
         BeginProperty Button6 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "还书"
            ImageIndex      =   4
         EndProperty
         BeginProperty Button7 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button8 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Style           =   3
         EndProperty
         BeginProperty Button9 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "重新登录"
            ImageIndex      =   5
         EndProperty
         BeginProperty Button10 {66833FEA-8583-11D1-B16A-00C0F0283628} 
            Caption         =   "退出系统"
            ImageIndex      =   6
         EndProperty
      EndProperty
   End
   Begin MSComctlLib.StatusBar status 
      Align           =   2  'Align Bottom
      Height          =   495
      Left            =   0
      TabIndex        =   0
      Top             =   4455
      Width           =   8625
      _ExtentX        =   15214
      _ExtentY        =   873
      _Version        =   393216
      BeginProperty Panels {8E3867A5-8586-11D1-B16A-00C0F0283628} 
         NumPanels       =   4
         BeginProperty Panel1 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Object.Width           =   4410
            MinWidth        =   4410
            Text            =   "Loading User Settings..."
            TextSave        =   "Loading User Settings..."
            Object.ToolTipText     =   "Current Logged In User Name"
         EndProperty
         BeginProperty Panel2 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   6
            TextSave        =   "2008-4-14"
            Object.ToolTipText     =   "System Date"
         EndProperty
         BeginProperty Panel3 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Style           =   5
            TextSave        =   "16:19"
            Object.ToolTipText     =   "System Time"
         EndProperty
         BeginProperty Panel4 {8E3867AB-8586-11D1-B16A-00C0F0283628} 
            Alignment       =   2
            Bevel           =   2
            Object.Width           =   11112
            MinWidth        =   11112
            Text            =   "Contact Me : www.sansan.com.cn"
            TextSave        =   "Contact Me : www.sansan.com.cn"
            Object.ToolTipText     =   "Programmers Info"
         EndProperty
      EndProperty
      MousePointer    =   99
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      MouseIcon       =   "frmMain.frx":7C0A
   End
   Begin VB.Menu mnuNewEntry 
      Caption         =   "基本信息"
      Begin VB.Menu mnuAddBookInfo 
         Caption         =   "&图书信息"
      End
      Begin VB.Menu mnuAddPublicationInfo 
         Caption         =   "&出版商信息"
      End
      Begin VB.Menu mnuCategory 
         Caption         =   "图书&分类"
      End
      Begin VB.Menu mnuSepBookInfo 
         Caption         =   "-"
      End
      Begin VB.Menu mnuClassInfo 
         Caption         =   "班级信息"
      End
      Begin VB.Menu mnuSepClass 
         Caption         =   "-"
      End
      Begin VB.Menu mnuAddMemberInfo 
         Caption         =   "读者信息"
      End
   End
   Begin VB.Menu mnuTransaction 
      Caption         =   "借还书业务"
      Begin VB.Menu mnuTransIssue 
         Caption         =   "&借书"
      End
      Begin VB.Menu mnuTransReturn 
         Caption         =   "&还书"
      End
   End
   Begin VB.Menu mnuSearch 
      Caption         =   "图书查询"
      Begin VB.Menu mnuSearchBookInfo 
         Caption         =   "&图书信息查询"
      End
      Begin VB.Menu mnuSearchMemberInfo 
         Caption         =   "&读者信息查询"
      End
      Begin VB.Menu mnuSearchIssue 
         Caption         =   "&外借图书查询"
      End
   End
   Begin VB.Menu mnuReports 
      Caption         =   "图书报表"
      Begin VB.Menu mnuRPTIssueDet 
         Caption         =   "&借书详细"
      End
      Begin VB.Menu muRPTStockDet 
         Caption         =   "&图书储备详细"
      End
      Begin VB.Menu mnuRPTMemberDet 
         Caption         =   "&读者详细"
      End
   End
   Begin VB.Menu mnuSetting 
      Caption         =   "系统设置"
      Begin VB.Menu mnuSettingFineAmt 
         Caption         =   "&罚款金额"
      End
      Begin VB.Menu mnuMaxDays 
         Caption         =   "允许借读最多天数"
      End
      Begin VB.Menu mnuSettingUser 
         Caption         =   "&用户信息"
      End
      Begin VB.Menu mnuSettingBackup 
         Caption         =   "&备份数据"
      End
   End
   Begin VB.Menu mnuUtility 
      Caption         =   "工具"
      Begin VB.Menu mnuNotepad 
         Caption         =   "笔记本"
      End
   End
   Begin VB.Menu mnuLogoff 
      Caption         =   "重新登录"
   End
   Begin VB.Menu mnuAboutMe 
      Caption         =   "关于"
   End
   Begin VB.Menu mnuExit 
      Caption         =   "退出系统"
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Option Explicit

'Declarations
'=====================================================
'Code for Opening WebLink
'API Declaration for opening my WebLink on Clicking StatusBar
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
'Constant Declaration
Const SW_SHOWNORMAL = 1
'=====================================================










'====================================================
' Menu Item Coding [Starts]
'====================================================

'When trying to unload application from Menu
Private Sub mnuExit_Click()
    Unload frmMain
End Sub


Private Sub mnuLogOff_Click()
    Call loggedOff
End Sub


Private Sub mnuAboutMe_Click()
    frmAbout.Show vbModal
End Sub

Private Sub mnuNotepad_Click()
On Error GoTo errHandle
    Dim a As Double
    a = Shell("c:\windows\notepad.exe", vbNormalFocus)
    Exit Sub
errHandle:
    MsgBox "Unable to run Notepad Utility on your computer", vbInformation, "Error in opening!!!"
    Resume Next
End Sub

Private Sub mnuCalculator_Click()
On Error GoTo errHandle
    Dim a As Double
    a = Shell("c:\windows\calc.exe", vbNormalFocus)
    Exit Sub
errHandle:
    MsgBox "Unable to run Calculator Utility on your computer", vbInformation, "Error in opening!!!"
    Resume Next
End Sub


'******************************************************
' The Form Callings....through Menu coding...
'******************************************************
Private Sub mnuAddBookInfo_Click()
    frmBookInfo.Show
    frmBookInfo.SetFocus
End Sub

Private Sub mnuAddPublicationInfo_Click()
    frmPubInfo.Show
    frmPubInfo.SetFocus
End Sub

Private Sub mnuCategory_Click()
    frmCatInfo.Show
    frmCatInfo.SetFocus
End Sub

Private Sub mnuClassInfo_Click()
    frmClassInfo.Show
    frmClassInfo.SetFocus
End Sub

Private Sub mnuRPTIssueDet_Click()
    rptIssueDetails.Show
    rptIssueDetails.Refresh
    rptIssueDetails.SetFocus
End Sub

Private Sub mnuRPTMemberDet_Click()
On Error Resume Next
    rptMemberInfo.Show
    rptMemberInfo.Refresh
    rptMemberInfo.SetFocus
End Sub

Private Sub mnuSearchBookInfo_Click()
    frmSrchBookInfo.Show
    frmSrchBookInfo.SetFocus
End Sub

Private Sub mnuSearchIssue_Click()
    frmSrchIssue.Show
    frmSrchIssue.SetFocus
End Sub

Private Sub mnuSearchMemberInfo_Click()
    frmSrchMember.Show
    frmSrchMember.SetFocus
End Sub

Private Sub mnuSettingBackup_Click()
    frmBackUp.Show vbModal
End Sub

Private Sub mnuSettingFineAmt_Click()
    'Take Settings value through inputbox
    Dim value As String
    value = InputBox("Enter Fine Amount", "Settings...!!!")
    'Prompt if invalid data is entered by user
    If Not IsNumeric(value) Then
        MsgBox "Improper Data Entered!", vbCritical, "Input Error"
        Exit Sub
    End If
    fineAmt = Str(value)
    SaveSetting App.Title, "Settings", "FineAmt", CStr(value)
End Sub

'Private Sub mnuSettingMaxIssueLimit_Click()
'    'Take Settings value through inputbox
'    Dim value As String
'    value = InputBox("Enter Maximum Book Issue Limit", "Settings...!!!")
'    'Prompt if invalid data is entered by user
'    If Not IsNumeric(value) Then
'        MsgBox "Improper Data Entered!", vbCritical, "Input Error"
'        Exit Sub
'    End If
'    totBooks = Str(value)
'    SaveSetting App.Title, "Settings", "TotalBooks", CStr(value)
'End Sub

Private Sub mnuMaxDays_Click()
    'Take Settings value through inputbox
    Dim value As String
    value = InputBox("Enter Maximum No. of Days Allowed", "Settings...!!!")
    'Prompt if invalid data is entered by user
    If Not IsNumeric(value) Then
        MsgBox "Improper Data Entered!", vbCritical, "Input Error"
        Exit Sub
    End If
    maxDays = Str(value)
    SaveSetting App.Title, "Settings", "MaxDays", CStr(value)
End Sub

Private Sub mnuSettingUser_Click()
    frmUser.Show
    frmUser.SetFocus
End Sub

Private Sub mnuAddMemberInfo_Click()
    frmMemberInfo.Show
    frmMemberInfo.SetFocus
End Sub

Private Sub mnuTransIssue_Click()
    frmIssue.Show
    frmIssue.SetFocus
End Sub

Private Sub mnuTransReturn_Click()
    frmReturn.Show
    frmReturn.SetFocus
End Sub

Private Sub muRPTStockDet_Click()
    rptBookDetails.Show
    rptBookDetails.Refresh
    rptBookDetails.SetFocus
End Sub
'====================================================
' Menu Item Coding [Ends]
'====================================================


Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
    Select Case Button.Index
        Case 1
                frmBookInfo.Show
                frmBookInfo.SetFocus
        Case 2
                frmMemberInfo.Show
                frmMemberInfo.SetFocus
        Case 5
                frmIssue.Show
                frmIssue.SetFocus
        Case 6
                frmReturn.Show
                frmReturn.SetFocus
        Case 9
                Call mnuLogOff_Click
        Case 10
                Call mnuExit_Click
    End Select
End Sub




'When Application is Unloaded
Private Sub MDIForm_Unload(Cancel As Integer)
On Error Resume Next
    If ApplicationUnload() <> 1 Then
        Cancel = True
    Else
        Unload frmSYSTRAYICON
    End If
End Sub


'====================================================
' Form Event Coding [Ends]
'====================================================










'=====================================================
'Code for Opening WebLink
Private Sub status_PanelClick(ByVal Panel As MSComctlLib.Panel)
        ShellExecute Me.hWnd, vbNullString, "http://www.vivekpatel.cjb.net", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub

⌨️ 快捷键说明

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