📄 frmmain.frm
字号:
'*****************************************************
'=====================================================
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
'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()
rptIssueDetails.Show
rptIssueDetails.Refresh
rptIssueDetails.SetFocus
End Sub
Private Sub mnuRPTMemberDet_Click()
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
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]
'====================================================
'=====================================================
'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
'=====================================================
'=====================================================
'*****************************************************
'* Vote For Me : If you really enjoy this utility or *
' helped by any of the functionality *
' than plz. reward us by your VOTE. *
'*****************************************************
'=====================================================
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -