Private Overflow As Currency 'value where overflow occurs
Private Delta As Currency
Private MinDelta As Currency
Private Digit As Long
Private LenPres As Long
Private Roll As Currency
Private BoxWidth As Long
Private BoxHeight As Long
Private CharWidth As Long
Private Recur As Long 'Control_Resize Recursion Depth
Private i
'Events
Public Event ReachedZero()
Public Event Reached100()
Private Declare Sub BitBlt Lib "gdi32" (ByVal DstDC As Long, ByVal DstX As Long, ByVal DstY As Long, ByVal DstW As Long, ByVal DstH As Long, ByVal SrcDC As Long, ByVal SrcX As Long, ByVal SrcY As Long, ByVal OpCode As Long)
Private Const CopySrc As Long = &HCC0020 'OpCode for BitBlt
Public Property Let BackColor(ByVal nwBackColor As OLE_COLOR)
Attribute BackColor.VB_Description = "Sets / Returns the Control's BackColor."
Attribute BackColor.VB_HelpID = 10000
Attribute BackColor.VB_UserMemId = -501
pcSource.BackColor = nwBackColor
For i = 0 To myDigits - 1
pcDigit(i).BackColor = nwBackColor
Next i
Set Font = pcSource.Font 'repaint pcSource
PropertyChanged "BackColor"
End Property
Public Property Get BackColor() As OLE_COLOR
BackColor = pcSource.BackColor
End Property
Public Property Get CharacterExtraX() As Long
Attribute CharacterExtraX.VB_Description = "Sets / Returns extra horizontal spacing for each digit."
Attribute CharacterExtraX.VB_HelpID = 10001
CharacterExtraX = myExtraX
End Property
Public Property Let CharacterExtraX(ByVal nwExtra As Long)
If nwExtra < (2 - BoxWidth) Or nwExtra > 30 Then
Err.Raise 380
Else 'NOT NWEXTRA...
myExtraX = nwExtra
Set Font = pcSource.Font
PropertyChanged "CaracterExtraX"
End If
End Property
Public Property Get CharacterExtraY() As Long
Attribute CharacterExtraY.VB_Description = "Sets / Returns extra vertical spacing for each digit."
Attribute CharacterExtraY.VB_HelpID = 10002
CharacterExtraY = myExtraY
End Property
Public Property Let CharacterExtraY(ByVal nwExtra As Long)
If nwExtra < (2 - BoxHeight) Or nwExtra > 30 Then
Err.Raise 380
Else 'NOT NWEXTRA...
myExtraY = nwExtra
Set Font = pcSource.Font
PropertyChanged "CaracterExtraY"
End If
End Property
Public Property Get ControlName() As String
Attribute ControlName.VB_Description = "Returns the real name of the Control."
Attribute ControlName.VB_HelpID = 10003
Dim CntrlName As String
CntrlName = Parent.ActiveControl.Name
i = Parent.ActiveControl.Index
If i >= 0 Then
CntrlName = CntrlName & "(" & Format$(i) & ")"
End If
ControlName = CntrlName
End Property
Public Property Get Digits() As Long
Attribute Digits.VB_Description = "Sets / Returns the Control's number of digits."
Attribute Digits.VB_HelpID = 10004
Attribute Digits.VB_MemberFlags = "200"
Digits = myDigits
End Property
Public Property Let Digits(ByVal nwDigits As Long)