home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / addins / vb5addin / commands.cls < prev    next >
Text File  |  1998-04-02  |  3KB  |  84 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Commands"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = False
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Public WithEvents m_app As Application
  11. Attribute m_app.VB_VarHelpID = -1
  12. Public WithEvents m_debugger As Debugger
  13. Attribute m_debugger.VB_VarHelpID = -1
  14.  
  15. Option Explicit
  16.  
  17. Public Sub Vb5AddInCommand()
  18.     
  19.     m_app.EnableModeless False
  20.     MsgBox "Vb5AddInCommand called!"
  21.     m_app.EnableModeless True
  22.  
  23.     ' TODO: In this and all other commands you may manipulate the Developer
  24.     '  Studio objects, by starting with the Application object, stored
  25.     '  in m_app.
  26.  
  27. End Sub
  28.  
  29. Private Sub m_app_BeforeApplicationShutDown()
  30.     m_app.PrintToOutputWindow "VB5AddIn received BeforeApplicationShutDown event"
  31. End Sub
  32.  
  33. Private Sub m_app_BeforeBuildStart()
  34.     m_app.PrintToOutputWindow "VB5AddIn received BeforeBuildStart event"
  35. End Sub
  36.  
  37. Private Sub m_app_BeforeDocumentClose(ByVal theDocument As Object)
  38.     m_app.PrintToOutputWindow "VB5AddIn received BeforeDocumentClose(" & theDocument & ") event"
  39.  
  40. End Sub
  41.  
  42. Private Sub m_app_BuildFinish(ByVal nNumErrors As Long, ByVal nNumWarnings As Long)
  43.     m_app.PrintToOutputWindow "VB5AddIn received BuildFinish(" & nNumErrors & ", " & nNumWarnings & ") event"
  44.  
  45. End Sub
  46.  
  47. Private Sub m_app_DocumentOpen(ByVal theDocument As Object)
  48.     m_app.PrintToOutputWindow "VB5AddIn received DocumentOpen(" & theDocument & ") event"
  49.  
  50. End Sub
  51.  
  52. Private Sub m_app_DocumentSave(ByVal theDocument As Object)
  53.     m_app.PrintToOutputWindow "VB5AddIn received DocumentSave(" & theDocument & ") event"
  54.  
  55. End Sub
  56.  
  57. Private Sub m_app_NewDocument(ByVal theDocument As Object)
  58.     m_app.PrintToOutputWindow "VB5AddIn received NewDocument(" & theDocument & ") event"
  59. End Sub
  60.  
  61. Private Sub m_app_NewWorkspace()
  62.     m_app.PrintToOutputWindow "VB5AddIn received NewWorkspace event"
  63. End Sub
  64.  
  65. Private Sub m_app_WindowActivate(ByVal theWindow As Object)
  66.     m_app.PrintToOutputWindow "VB5AddIn received WindowActivate(" & theWindow & ") event"
  67. End Sub
  68.  
  69. Private Sub m_app_WindowDeactivate(ByVal theWindow As Object)
  70.     m_app.PrintToOutputWindow "VB5AddIn received WindowDeactivate(" & theWindow & ") event"
  71. End Sub
  72.  
  73. Private Sub m_app_WorkspaceClose()
  74.     m_app.PrintToOutputWindow "VB5AddIn received WorkspaceClose event"
  75. End Sub
  76.  
  77. Private Sub m_app_WorkspaceOpen()
  78.     m_app.PrintToOutputWindow "VB5AddIn received WorkspaceOpen event"
  79. End Sub
  80.  
  81. Private Sub m_debugger_BreakpointHit(ByVal pBreakpoint As Object)
  82.     m_app.PrintToOutputWindow "VB5AddIn received BreakpointHit event"
  83. End Sub
  84.