*/
Want to see what people are talking about? See the latest forum posts.
*/

View \CTIP.CLS

Tip of the Day routines

Submitted By: WEBMASTER
Rating: (Not rated) (Rate It)


VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "cTip"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
' Class Name:   cTip.cls - From VBPJ page 100, October 1995, Deborah Kurata
' Author:       Deborah Kurata, InStep Technologies
' Modified by:  Larry Rebich, The Bridge, Inc. 71662,205
' Date:         95/06/09 - Deborah
'               95/09/17 - Larry
' Description:  Displays the "Tip of the Day"
' Revisions:
'
    Option Explicit
   
' Show Debuging messages?
' Change to False to not compile the MsgBoxes
    #Const ShowDebugMsgBox = False
'    #Const ShowDebugMsgBox = True
   
' Public: **********************************
' Public data members

' Private: *********************************
' Private data members

    Private m_sText As String
    Private m_sID As String
    Private m_dtCreated As Date
' Public: **********************************

Public Property Let Text(sText As String)
' Public property procedures
' Description of the tip
    m_sText = sText
End Property
Public Property Get Text() As String
    Text = m_sText
End Property
Public Property Let ID(sID As String)
' ID within the collection
' Note: It must be a string
    m_sID = sID
End Property
Public Property Get ID() As String
    ID = m_sID
End Property
Public Property Get Created() As Date
' Read-only creation date
    Created = m_dtCreated
End Property
Private Sub Class_Initialize()
' Initialize event
    m_dtCreated = Now
' Dispay this in a message box
' This is good for debugging, but should be removed for production
    #If ShowDebugMsgBox Then
        MsgBox "Tip created: " & Created, vbInformation
    #End If
End Sub
Private Sub Class_Terminate()
' Terminate Event
' Dispay this in a message box
' This is good for debugging, but should be removed for production
    #If ShowDebugMsgBox Then
        MsgBox "Tip: " & Created & " is now terminated.", vbInformation
    #End If
End Sub

corner
© 1996-2008 CommunityHeaven LLC. All rights reserved. Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
North American business development: Nicolai Wadstrom. Publisher: Lars Hagelin.