VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "TapeMeasure"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'Klasa TapeMeasure
Private width As Single, factor As Single

Public Sub setUnits(units As String)
  'Pozwala na użycie jako jednostek centymetrów lub stóp
  Select Case LCase$(units)
    Case "c":           'centymetry
      factor = 1
    Case "f":           'stopy
      factor = 30.48
    Case Else
      factor = 1
  End Select
End Sub

Public Function Measure() As Single
  width = Rnd * 100#
  Measure = width / factor
End Function

Public Function lastMeasure() As Single
  lastMeasure = width / factor
End Function

Private Sub Class_Initialize()
  factor = 1
  width = 1
End Sub
