home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form TestForm
- Caption = "EventTimerClass Test Form"
- ClientHeight = 2790
- ClientLeft = 60
- ClientTop = 345
- ClientWidth = 4680
- LinkTopic = "Form1"
- ScaleHeight = 2790
- ScaleWidth = 4680
- StartUpPosition = 3 'Windows Default
- Begin VB.CommandButton Command1
- Caption = "Start Timer"
- BeginProperty Font
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 495
- Left = 480
- TabIndex = 0
- Top = 240
- Width = 1575
- End
- Begin VB.Label Label4
- BeginProperty Font
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2280
- TabIndex = 4
- Top = 1440
- Width = 495
- End
- Begin VB.Label Label3
- BeginProperty Font
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 2280
- TabIndex = 3
- Top = 1080
- Width = 495
- End
- Begin VB.Label Label2
- Caption = "Hours Elapsed"
- BeginProperty Font
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 480
- TabIndex = 2
- Top = 1440
- Width = 1695
- End
- Begin VB.Label Label1
- Caption = "Minutes Elapsed"
- BeginProperty Font
- Name = "Verdana"
- Size = 9
- Charset = 0
- Weight = 400
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- Height = 255
- Left = 480
- TabIndex = 1
- Top = 1080
- Width = 1695
- End
- Attribute VB_Name = "TestForm"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim WithEvents TMR As EventTimerClass
- Attribute TMR.VB_VarHelpID = -1
- Private Sub Command1_Click()
- If Command1.Caption = "Start Timer" Then
- Command1.Caption = "Pause Timer"
- TMR.StartCounting
- Else
- Command1.Caption = "Start Timer"
- TMR.StopCounting
- End If
- End Sub
- Private Sub Form_Load()
- Set TMR = New EventTimerClass
- End Sub
- Private Sub TMR_Hour()
- Label4.Caption = Val(Label4.Caption) + 1
- End Sub
- Private Sub TMR_Minute()
- Label3.Caption = Val(Label3.Caption) + 1
- End Sub
-