home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "CTimeDisplayManager"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- ' This class manages the CTimeZoneControl objects
- Option Explicit
- Private m_GMT_Offset As Integer ' indicates Greenwich Mean Time
- Private m_colTimeZones As Collection
- Private Sub Class_Initialize()
-
-
- ' intialize private data
- Set m_colTimeZones = New Collection
-
-
- End Sub
- Public Sub Add(oYourTimeZoneControl As CTimeZoneControl)
-
-
- ' add this object to the collection
- m_colTimeZones.Add oYourTimeZoneControl
-
-
- End Sub
- ' This procedure updates the display of all of the CTimeZoneControl controls with their
- ' respective times
- Public Sub UpdateTimeZoneControls()
-
-
- Dim oTempTimeZoneControl As CTimeZoneControl
-
- ' set the relative time of each CTimeZoneControl
- For Each oTempTimeZoneControl In m_colTimeZones
- With oTempTimeZoneControl
- .InputControl.Text = Format$(DateAdd("h", .TimeZoneOffset - m_GMT_Offset, Time), "h:nn:ss")
- End With ' oTempTimeZoneControl
- Next oTempTimeZoneControl
-
-
- End Sub
- Public Property Let GreenwichMeanTimeOffset(iNew_GMT As Integer)
-
-
- ' set GMT offset
- m_GMT_Offset = iNew_GMT
- ' update controls
- Call UpdateTimeZoneControls
-
-
- End Property
- Public Property Get GreenwichMeanTimeOffset() As Integer
-
-
- ' return GMT offset
- GreenwichMeanTimeOffset = m_GMT_Offset
-
-
- End Property
-