home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form TestForm
- Caption = "CTimer Class Test Form"
- ClientHeight = 1890
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4680
- LinkTopic = "Form1"
- ScaleHeight = 1890
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "Start Timing"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 2
- Top = 240
- Width = 1935
- End
- Begin VB.CommandButton Command2
- Caption = "Show Interval"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 120
- TabIndex = 1
- Top = 1200
- Width = 1935
- End
- Begin VB.CommandButton Command3
- Caption = "E X I T"
- BeginProperty Font
- Name = "Verdana"
- Size = 9.75
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 2640
- TabIndex = 0
- Top = 1200
- Width = 1935
- End
- Attribute VB_Name = "TestForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim TMR As New CTimer
- Private Sub Command1_Click()
- If Command1.Caption = "Start Timing" Then
- TMR.StartCounting
- Command1.Caption = "Stop Timing"
- Else
- TMR.StopCounting
- Command1.Caption = "Start Timing"
- End If
- End Sub
- Private Sub Command2_Click()
- ETime = TMR.ElapsedTime
- MsgBox "I've been counting for " & vbCrLf & _
- Hour(ETime) & " hours" & vbCrLf & _
- Minute(ETime) & " minutes and " & vbCrLf & _
- Second(ETime) & " seconds" & vbCrLf
- End Sub
- Private Sub Command3_Click()
- End
- End Sub
-