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

📄 frmmain.frm

📁 图书管理系统!有源代码!论文!心得!
💻 FRM
📖 第 1 页 / 共 2 页
字号:
'Constant Declaration
Const SW_SHOWNORMAL = 1
'=====================================================











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

'When trying to unload application from Menu
Private Sub mnuExit_Click()
  Dim check
 check = MsgBox("你确定退出吗?", vbExclamation + vbOKCancel, "图书管理系统")
        If check = vbOK Then

 End
    End If
 '   Unload frmMain
End Sub


Private Sub mnuLogOff_Click()
    Call loggedOff
End Sub


Private Sub mnuAboutMe_Click()
    frmAbout.Show vbModal
End Sub


'UTILITY
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()
    frmIssue.Show
    frmIssue.Refresh
    frmIssue.SetFocus
End Sub

Private Sub mnuRPTMemberDet_Click()
    frmMemberInfo.Show
    frmMemberInfo.Refresh
    frmMemberInfo.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()
   frmBookInfo.Show
   frmBookInfo.Refresh
   frmBookInfo.SetFocus
    '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
               flagCloseAll = True
                Unload Me
        Case 13
                Call mnuExit_Click
    End Select
End Sub


'====================================================
' Form Event Coding [Starts]
'====================================================

Private Sub MDIForm_Initialize()
    App.HelpFile = App.Path & "\Help\Lms.hlp"
    Me.HelpContextID = 0
End Sub

Private Sub MDIForm_Load()
    'First display the MDI Form
    frmMain.Show
    
    'Display Good-Thoughts form on start-up
  '  frmTip.Show vbModal
    DoEvents
    
    frmWelcome.Show
       
    DoEvents
    flagCloseAll = False
End Sub

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


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









⌨️ 快捷键说明

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