home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / ds_thing.cls < prev    next >
Encoding:
Text File  |  1995-07-26  |  908 b   |  40 lines

  1. VERSION 1.0 CLASS
  2. BEGIN
  3.   MultiUse = -1  'True
  4. END
  5. Attribute VB_Name = "Thing"
  6. Attribute VB_Creatable = True
  7. Attribute VB_Exposed = True
  8. Attribute VB_Description = "Thing--Sample OLE Server"
  9. Option Explicit
  10.  
  11. Public Name As String
  12. Private datCreated As Date
  13. Private vbCrLf As String
  14.  
  15. Property Get Created() As Date
  16.     Created = datCreated
  17. End Property
  18.  
  19. Public Sub ReverseName()
  20.     Dim intCt As Integer
  21.     Dim strNew As String
  22.     For intCt = 1 To Len(Name)
  23.         strNew = Mid(Name, intCt, 1) & strNew
  24.     Next intCt
  25.     Name = strNew
  26. End Sub
  27.  
  28. Private Sub Class_Initialize()
  29.     vbCrLf = Chr$(13) & Chr$(10)
  30.     datCreated = Now
  31.     MsgBox "Name: " & Name & vbCrLf _
  32.         & "Created: " & Created, , "Thing Initialize"
  33. End Sub
  34.  
  35. Private Sub Class_Terminate()
  36.     MsgBox "Name: " & Me.Name & vbCrLf _
  37.         & "Created: " & Me.Created, , "Thing Terminate"
  38. End Sub
  39.  
  40.