mdi_start.frm
来自「Library Management System 1」· FRM 代码 · 共 486 行 · 第 1/2 页
FRM
486 行
Begin VB.Menu firstbarsecond
Caption = "-"
End
Begin VB.Menu sm_exit
Caption = "&Exit"
Shortcut = ^X
End
End
Begin VB.Menu mnu_tranjection
Caption = "T&ransaction"
Begin VB.Menu sm_issue
Caption = "&Issue"
Shortcut = ^I
End
Begin VB.Menu sm_return
Caption = "&Return"
Shortcut = ^R
End
Begin VB.Menu secondbarfirst
Caption = "-"
End
Begin VB.Menu sm_search
Caption = "&Search.."
Shortcut = ^S
End
End
Begin VB.Menu mnu_administer
Caption = "&Administrator"
Begin VB.Menu sm_employees
Caption = "&Employees"
Shortcut = ^E
End
Begin VB.Menu sm_global
Caption = "&Global"
Shortcut = ^G
End
Begin VB.Menu thirdbarfirst
Caption = "-"
End
Begin VB.Menu sm_backup
Caption = "Back up"
Shortcut = ^U
End
Begin VB.Menu temp
Caption = "-"
End
Begin VB.Menu sm_settings
Caption = "Se&ttings"
Shortcut = ^T
End
End
Begin VB.Menu mnu_tools
Caption = "&Tools"
Begin VB.Menu sm_notepad
Caption = "Notepad"
Shortcut = ^N
End
Begin VB.Menu sm_calculator
Caption = "Calculator"
Shortcut = ^C
End
End
Begin VB.Menu mnu_help
Caption = "&Help"
Begin VB.Menu sm_help
Caption = "Context"
Shortcut = ^O
End
Begin VB.Menu sm_hsearch
Caption = "Search for help topic"
Shortcut = ^H
End
Begin VB.Menu helpbar
Caption = "-"
End
Begin VB.Menu sm_about
Caption = "About"
Shortcut = {F1}
End
End
End
Attribute VB_Name = "mdi_start"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Declare Function OSWinHelp% Lib "User32" Alias "WinHelpA" (ByVal hWnd&, ByVal HelpFile$, ByVal wCommand%, dwData As Any)
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
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub cmd_books_Click()
Load Frm_books
Frm_books.Show
End Sub
Private Sub cmd_exit_Click()
Unload Me
End Sub
Private Sub cmd_issue_Click()
Load Frm_issue
Frm_issue.Show
End Sub
Private Sub cmd_logoff_Click()
If MsgBox("Are You Sure you want to logoff ?", vbExclamation + vbOKCancel, "Library Management System") = vbOK Then
Call logoff
DoEvents
End If
End Sub
Private Sub cmd_members_Click()
Load Frm_members
Frm_members.Show
End Sub
Private Sub cmd_Return_Click()
Load Frm_return
Frm_return.Show
End Sub
Private Sub cmd_search_Click()
Load Frm_search
Frm_search.Show
End Sub
Private Sub MDIForm_Load()
Me.Top = 0
Me.Left = 0
Me.Height = Screen.Height - 400
Me.Width = Screen.Width
Me.Show
Me.Enabled = False
End Sub
Private Sub MDIForm_Unload(Cancel As Integer)
On Error Resume Next
If MsgBox("Are You Sure you want to Quit ?", vbExclamation + vbOKCancel, "Library Management System") = vbOK Then
Unload frmLogin
Else
Cancel = True
End If
End Sub
Private Sub sbStatusBar_PanelClick(ByVal Panel As MSComctlLib.Panel)
ShellExecute Me.hWnd, vbNullString, "http://www.yahoo.com", vbNullString, vbNullString, SW_SHOWNORMAL
End Sub
Private Sub sm_about_Click()
Load frmAbout
frmAbout.Show
End Sub
Private Sub sm_backup_Click()
Load Frm_backup
Frm_backup.Show
End Sub
Private Sub sm_books_Click()
Call cmd_books_Click
End Sub
Private Sub sm_calculator_Click()
On Error GoTo errHandle
Dim a As Double
a = Shell("C:\WINDOWS\System32\calc.exe", vbNormalFocus)
Exit Sub
errHandle:
MsgBox "Unable to run Calculator Utility on your computer", vbInformation, "Error in opening!!!"
Resume Next
End Sub
Private Sub sm_employees_Click()
Load Frm_Employees
Frm_Employees.Show
End Sub
Private Sub sm_exit_Click()
Call cmd_exit_Click
End Sub
Private Sub sm_global_Click()
Load Frm_global
Frm_global.Show
End Sub
Private Sub sm_help_Click()
Dim nRet As Integer
'if there is no helpfile for this project display a message to the user
'you can set the HelpFile for your application in the
'Project Properties dialog
If Len(App.HelpFile) = 0 Then
MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hWnd, App.HelpFile, 3, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub sm_hsearch_Click()
Dim nRet As Integer
'if there is no helpfile for this project display a message to the user
'you can set the HelpFile for your application in the
'Project Properties dialog
If Len(App.HelpFile) = 0 Then
MsgBox "Unable to display Help Contents. There is no Help associated with this project.", vbInformation, Me.Caption
Else
On Error Resume Next
nRet = OSWinHelp(Me.hWnd, App.HelpFile, 261, 0)
If Err Then
MsgBox Err.Description
End If
End If
End Sub
Private Sub sm_issue_Click()
Call cmd_issue_Click
End Sub
Private Sub sm_logoff_Click()
Call cmd_logoff_Click
End Sub
Private Sub sm_members_Click()
Call cmd_members_Click
End Sub
Private Sub sm_notepad_Click()
On Error GoTo errcode
Dim a As Double
a = Shell("C:\WINDOWS\System32\notepad.exe", vbNormalFocus)
Exit Sub
errcode:
MsgBox "Unable to run Notepad Utility on your computer", vbInformation, "Error in opening!!!"
Resume Next
End Sub
Private Sub sm_return_Click()
Call cmd_Return_Click
End Sub
Private Sub sm_search_Click()
Call cmd_search_Click
End Sub
Private Sub sm_settings_Click()
Load Frm_settings
Frm_settings.Show
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?