home *** CD-ROM | disk | FTP | other *** search
/ Mastering Visual Basic 6 / mastvb6.iso / ch_code / ch15 / evntimer / testform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1998-07-06  |  3.6 KB  |  120 lines

  1. VERSION 5.00
  2. Begin VB.Form TestForm 
  3.    Caption         =   "EventTimerClass Test Form"
  4.    ClientHeight    =   2790
  5.    ClientLeft      =   60
  6.    ClientTop       =   345
  7.    ClientWidth     =   4680
  8.    LinkTopic       =   "Form1"
  9.    ScaleHeight     =   2790
  10.    ScaleWidth      =   4680
  11.    StartUpPosition =   3  'Windows Default
  12.    Begin VB.CommandButton Command1 
  13.       Caption         =   "Start Timer"
  14.       BeginProperty Font 
  15.          Name            =   "Verdana"
  16.          Size            =   9
  17.          Charset         =   0
  18.          Weight          =   400
  19.          Underline       =   0   'False
  20.          Italic          =   0   'False
  21.          Strikethrough   =   0   'False
  22.       EndProperty
  23.       Height          =   495
  24.       Left            =   480
  25.       TabIndex        =   0
  26.       Top             =   240
  27.       Width           =   1575
  28.    End
  29.    Begin VB.Label Label4 
  30.       BeginProperty Font 
  31.          Name            =   "Verdana"
  32.          Size            =   9
  33.          Charset         =   0
  34.          Weight          =   400
  35.          Underline       =   0   'False
  36.          Italic          =   0   'False
  37.          Strikethrough   =   0   'False
  38.       EndProperty
  39.       Height          =   255
  40.       Left            =   2280
  41.       TabIndex        =   4
  42.       Top             =   1440
  43.       Width           =   495
  44.    End
  45.    Begin VB.Label Label3 
  46.       BeginProperty Font 
  47.          Name            =   "Verdana"
  48.          Size            =   9
  49.          Charset         =   0
  50.          Weight          =   400
  51.          Underline       =   0   'False
  52.          Italic          =   0   'False
  53.          Strikethrough   =   0   'False
  54.       EndProperty
  55.       Height          =   255
  56.       Left            =   2280
  57.       TabIndex        =   3
  58.       Top             =   1080
  59.       Width           =   495
  60.    End
  61.    Begin VB.Label Label2 
  62.       Caption         =   "Hours Elapsed"
  63.       BeginProperty Font 
  64.          Name            =   "Verdana"
  65.          Size            =   9
  66.          Charset         =   0
  67.          Weight          =   400
  68.          Underline       =   0   'False
  69.          Italic          =   0   'False
  70.          Strikethrough   =   0   'False
  71.       EndProperty
  72.       Height          =   255
  73.       Left            =   480
  74.       TabIndex        =   2
  75.       Top             =   1440
  76.       Width           =   1695
  77.    End
  78.    Begin VB.Label Label1 
  79.       Caption         =   "Minutes Elapsed"
  80.       BeginProperty Font 
  81.          Name            =   "Verdana"
  82.          Size            =   9
  83.          Charset         =   0
  84.          Weight          =   400
  85.          Underline       =   0   'False
  86.          Italic          =   0   'False
  87.          Strikethrough   =   0   'False
  88.       EndProperty
  89.       Height          =   255
  90.       Left            =   480
  91.       TabIndex        =   1
  92.       Top             =   1080
  93.       Width           =   1695
  94.    End
  95. Attribute VB_Name = "TestForm"
  96. Attribute VB_GlobalNameSpace = False
  97. Attribute VB_Creatable = False
  98. Attribute VB_PredeclaredId = True
  99. Attribute VB_Exposed = False
  100. Dim WithEvents TMR As EventTimerClass
  101. Attribute TMR.VB_VarHelpID = -1
  102. Private Sub Command1_Click()
  103.     If Command1.Caption = "Start Timer" Then
  104.         Command1.Caption = "Pause Timer"
  105.         TMR.StartCounting
  106.     Else
  107.         Command1.Caption = "Start Timer"
  108.         TMR.StopCounting
  109.     End If
  110. End Sub
  111. Private Sub Form_Load()
  112.     Set TMR = New EventTimerClass
  113. End Sub
  114. Private Sub TMR_Hour()
  115.     Label4.Caption = Val(Label4.Caption) + 1
  116. End Sub
  117. Private Sub TMR_Minute()
  118.     Label3.Caption = Val(Label3.Caption) + 1
  119. End Sub
  120.