home *** CD-ROM | disk | FTP | other *** search
/ Dan Appleman's Visual Bas…s Guide to the Win32 API / Dan.Applmans.Visual.Basic.5.0.Programmers.Guide.To.The.Win32.API.1997.Ziff-Davis.Press.CD / VB5PG32.mdf / desaware / apitools / api_addn.cls next >
Encoding:
Visual Basic class definition  |  1997-02-13  |  1.3 KB  |  61 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = 0   'False
  4. END
  5. Attribute VB_Name = "ListAPIAddInClass"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = True
  8. Attribute VB_PredeclaredId = False
  9. Attribute VB_Exposed = True
  10. Attribute VB_Description = "Desaware ListAPI API Toolkit"
  11. ' Copyright ⌐ 1996-1997 by Desaware Inc.  All Rights Reserved
  12. ' Part of the Desaware API Toolkit
  13.  
  14. Option Explicit
  15. Dim AddInItems As Object
  16. Dim ListAPIMenu As Object
  17.  
  18. Sub ConnectAddIn(ByVal VBInst As Object)
  19.   On Error GoTo error_handler
  20.  
  21.   Dim x As Long
  22.   Dim AddInMenu As Object
  23.   Screen.MousePointer = 11
  24.   Set gobjVBInst = VBInst
  25.   Set AddInMenu = gobjVBInst.AddInMenu
  26.   Set AddInItems = AddInMenu.MenuItems
  27.   Set ListAPIMenu = AddInItems.Add("Desaware &ListAPI API Toolkit...")
  28.  
  29.   x = ListAPIMenu.ConnectEvents(Me)
  30.   Screen.MousePointer = 0
  31.   Exit Sub
  32. error_handler:
  33.   MsgBox Error$
  34.   Screen.MousePointer = 0
  35.   Exit Sub
  36.  
  37. End Sub
  38. Sub DisconnectAddIn(ByVal mode As Integer)
  39.   AddInItems.Remove ListAPIMenu
  40. '  End
  41. End Sub
  42.  
  43.  
  44. Sub AfterClick()
  45.     On Error GoTo handler:
  46.     Dim x As Object
  47.     Screen.MousePointer = 11
  48.     Set x = CreateObject("ListAPI.ListAPIClass")
  49.     ' Got class
  50.     x.ListAPIMakeAddin gobjVBInst
  51.     Screen.MousePointer = 0
  52.     Exit Sub
  53. handler:
  54. MsgBox Error$
  55. Screen.MousePointer = 0
  56. Exit Sub
  57. End Sub
  58.  
  59.  
  60.  
  61.