' TimeTest.vb
' Demonstrating class CTime.

    Imports System.Windows.Forms

Module modTimeTest

    Sub Main()
        Dim time As New CTime   ' call CTime constructor
        Dim output As String

        output = "The initial universal times is: " & _
           time.ToUniversalString() & vbCrLf & _
           "The initial standard time is: " & _
           time.ToStandardString()

        time.SetTime(13, 27, 6) ' set time with valid settings

        output &= vbCrLf & vbCrLf & _
           "Universal time after setTime is: " & _
           time.ToUniversalString() & vbCrLf & _
           "Standard time after setTime is: " & _
           time.ToStandardString()

        time.SetTime(99, 99, 99) ' set time with invalid settings

        output &= vbCrLf & vbCrLf & _
           "After attempting invalid settings: " & vbCrLf & _
           "Universal time: " & time.ToUniversalString() & _
           vbCrLf & "Standard time: " & time.ToStandardString()

        MessageBox.Show(output, "Testing Class CTime")
    End Sub ' Main

End Module ' modTimeTest


