home *** CD-ROM | disk | FTP | other *** search
/ Programming Languages Suite / ProgramD2.iso / Visual Database / Visual BASIC 5.0 (Ent. Edition) / Vb5ent Extractor.EXE / VB / SAMPLES / COMPTOOL / ACTVCOMP / COFFEE / CO2CONN2.CLS < prev    next >
Encoding:
Visual Basic class definition  |  1996-11-27  |  1.3 KB  |  41 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Connector2"
  6. Attribute VB_GlobalNameSpace = False
  7. Attribute VB_Creatable = True
  8. Attribute VB_PredeclaredId = True
  9. Attribute VB_Exposed = True
  10. Option Explicit
  11. ' > For an overview of this sample application, search
  12. '   online Help for Coffee.
  13. ' > AboutCof.Txt, in the Related Documents folder of
  14. '   CoffWat2.vbp, also contains information about the sample.
  15.  
  16. ' Connector2 class allows multiple clients to share a
  17. ' ----------------  single instance of CoffeeMonitor2.  The
  18. '   Connector2 class has its Instancing property set to
  19. '   MultiUse, so each client can create its own Connector2.
  20. '   All the Connector objects return a reference to the
  21. '   single shared CoffeeMonitor2 object, so all the clients
  22. '   share the same CoffeeMonitor2.  (See the CoffeeMonitor2
  23. '   property, below.)
  24.  
  25. ' CoffeeMonitor2 property always returns the single global
  26. ' --------------   reference to the shared instance of
  27. '   CoffeeMonitor2.
  28. '
  29. Public Property Get CoffeeMonitor2() As CoffeeMonitor2
  30.     ' If the shared CoffeeMonitor object hasn't been
  31.     '   created, create it and store a global reference
  32.     '   to it.
  33.     If gCoffeeMonitor2 Is Nothing Then
  34.         Set gCoffeeMonitor2 = New CoffeeMonitor2
  35.     End If
  36.     
  37.     Set CoffeeMonitor2 = gCoffeeMonitor2
  38. End Property
  39.     
  40.  
  41.