home *** CD-ROM | disk | FTP | other *** search
/ CD Shareware Magazine 1996 December / CD_shareware_12-96.iso / WIN / Programa / VBINTRNT.ZIP / VBINTRNT.EXE / VBONLINE.CLS < prev    next >
Encoding:
Text File  |  1996-04-16  |  1.5 KB  |  67 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "VBWebClass"
  6. Attribute VB_Creatable = True
  7. Attribute VB_Exposed = True
  8. Attribute VB_Description = "Visual Basic Web Surfer"
  9. Dim AddInItems As Object    'VBIDE.MenuItems
  10. Dim DFDMenu As Object       'VBIDE.MenuLine
  11. Dim ConnectID As Long
  12.  
  13.  
  14. Sub AfterClick()
  15.     webForm.Show
  16. End Sub
  17.  
  18.  
  19. '------------------------------------------------------
  20. 'this method adds the Add-In to the VB menu
  21. 'it is called by the VB addin manager
  22. '------------------------------------------------------
  23. Sub ConnectAddIn(VBInst As VBIDE.Application)
  24.  
  25.   splash.Show
  26.   On Error GoTo error_handler
  27.     
  28.   Set gobjIDEAppInst = VBInst
  29.   Set AddInItems = VBInst.AddInMenu.MenuItems
  30.   Set DFDMenu = AddInItems.Add("&Surf The VB Online World...")
  31.   ConnectID = DFDMenu.ConnectEvents(Me)
  32.   loadPages
  33.   Unload splash
  34.  
  35. Exit Sub
  36.     
  37. error_handler:
  38.   MsgBox Err.Description
  39.   Exit Sub
  40.     
  41. End Sub
  42.  
  43. '------------------------------------------------------
  44. 'this method removes the Add-In from the VB menu
  45. 'it is called by the VB addin manager
  46. '------------------------------------------------------
  47. Sub DisconnectAddIn(ByVal mode As Integer)
  48.  
  49.   'Disconnect the event handler
  50.   DFDMenu.DisconnectEvents ConnectID
  51.   
  52.   'remove it from the menu
  53.   AddInItems.Remove DFDMenu
  54. End Sub
  55.  
  56.  
  57. Private Sub Class_Terminate()
  58.  
  59.  
  60.     For i = 0 To Forms.Count - 1
  61.         Unload Forms(i)
  62.     Next
  63.     
  64. End Sub
  65.  
  66.  
  67.