home *** CD-ROM | disk | FTP | other *** search
/ The Best of Windows 95.com 1996 September / WIN95_09964.iso / program / vxlcd12.zip / Stopwtch.frm < prev    next >
Text File  |  1996-07-20  |  3KB  |  122 lines

  1. VERSION 4.00
  2. Begin VB.Form Stopwatch 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Stopwatch"
  5.    ClientHeight    =   1065
  6.    ClientLeft      =   60
  7.    ClientTop       =   4020
  8.    ClientWidth     =   3570
  9.    Height          =   1470
  10.    Icon            =   "Stopwtch.frx":0000
  11.    Left            =   0
  12.    LinkTopic       =   "Form1"
  13.    LockControls    =   -1  'True
  14.    MaxButton       =   0   'False
  15.    MinButton       =   0   'False
  16.    ScaleHeight     =   1065
  17.    ScaleWidth      =   3570
  18.    ShowInTaskbar   =   0   'False
  19.    Top             =   3675
  20.    Width           =   3690
  21.    Begin VB.CommandButton Command1 
  22.       Caption         =   "Close"
  23.       Height          =   315
  24.       Left            =   2640
  25.       TabIndex        =   4
  26.       Top             =   660
  27.       Width           =   735
  28.    End
  29.    Begin VB.CommandButton cmdReset 
  30.       Caption         =   "Reset"
  31.       Height          =   315
  32.       Left            =   1800
  33.       TabIndex        =   3
  34.       Top             =   660
  35.       Width           =   735
  36.    End
  37.    Begin VB.CommandButton cmdStop 
  38.       Caption         =   "Stop"
  39.       Height          =   315
  40.       Left            =   960
  41.       TabIndex        =   2
  42.       Top             =   660
  43.       Width           =   735
  44.    End
  45.    Begin VB.CommandButton cmdStart 
  46.       Caption         =   "Start"
  47.       Height          =   315
  48.       Left            =   120
  49.       TabIndex        =   1
  50.       Top             =   660
  51.       Width           =   735
  52.    End
  53.    Begin VB.Timer Timer1 
  54.       Enabled         =   0   'False
  55.       Interval        =   20
  56.       Left            =   120
  57.       Top             =   720
  58.    End
  59.    Begin VB.PictureBox picLCD 
  60.       BackColor       =   &H00008000&
  61.       ForeColor       =   &H00800000&
  62.       Height          =   375
  63.       Left            =   120
  64.       ScaleHeight     =   315
  65.       ScaleWidth      =   3195
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   3255
  69.    End
  70. End
  71. Attribute VB_Name = "Stopwatch"
  72. Attribute VB_Creatable = False
  73. Attribute VB_Exposed = False
  74. Option Explicit
  75.  
  76. Dim moLCD   As New CLCD
  77. Dim mlCount As Long
  78.  
  79.  
  80. Private Sub cmdReset_Click()
  81.  
  82.     Timer1.Enabled = False
  83.     mlCount = 10000
  84.     moLCD.Caption = "1,000.0"
  85.     
  86. End Sub
  87.  
  88. Private Sub cmdStart_Click()
  89.     Timer1.Enabled = True
  90. End Sub
  91.  
  92. Private Sub cmdStop_Click()
  93.     Timer1.Enabled = False
  94. End Sub
  95.  
  96. Private Sub Command1_Click()
  97.     Unload Me
  98. End Sub
  99.  
  100. Private Sub Form_Load()
  101.     
  102.     mlCount = 10000
  103.  
  104.     With moLCD
  105.         .BackColor = &H808080
  106.         .ForeColor = &H800000
  107.         Set .Container = picLCD
  108.         .Caption = "1,000.0"
  109.     End With
  110.  
  111. End Sub
  112.  
  113. Private Sub Form_Unload(Cancel As Integer)
  114.     Set moLCD = Nothing
  115.     Set Stopwatch = Nothing
  116. End Sub
  117.  
  118. Private Sub Timer1_Timer()
  119.     mlCount = mlCount + 1
  120.     moLCD.Caption = Format$(mlCount / 10, "###,###,##0.0")
  121. End Sub
  122.