VERSION 5.00
Begin VB.UserControl RotativeLabel 
   Alignable       =   -1  'True
   AutoRedraw      =   -1  'True
   BackColor       =   &H00808080&
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   ControlContainer=   -1  'True
   DefaultCancel   =   -1  'True
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   ForwardFocus    =   -1  'True
   KeyPreview      =   -1  'True
   ScaleHeight     =   240
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   320
   ToolboxBitmap   =   "RotativeLabel.ctx":0000
End
Attribute VB_Name = "RotativeLabel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Attribute VB_Ext_KEY = "PropPageWizardRun" ,"Yes"
Option Explicit

    Public Enum rblStyles
    rbl_none = 0
    rbl_UpDown = 1
    rbl_DownUp = 2
    rbl_LeftRight = 3
    rbl_RightLeft = 4
    End Enum

'Default Property Values:
Const m_def_FontPitchAndFamily = 0
Const m_def_FontOrientation = 0
Const m_def_FontWidth = 0
Const m_def_FontWeight = 0
Const m_def_FontOutPrecision = 0
Const m_def_FontClipPrecision = 0
Const m_def_FontQuality = 0
Const m_def_SimulateCaptionDrag = True
Const m_def_DrawMode = 13
Const m_def_InverseShadow = False
Const m_def_DegradeeColor = 12632256
Const m_def_DegradeeInit = 255
Const m_def_ShadowDisplacementX = 1
Const m_def_ShadowDisplacementY = 1
Const m_def_Shadowed = True
Const m_def_Angle = 90
Const m_def_Caption = "RotativeText"
Const m_def_CaptionX = 6
Const m_def_CaptionY = 6
Const m_def_DegradeeSteps = 30
Const m_def_DegradeeStyle = 1
Const m_def_ScaleMode = 3

'Property Variables:
Dim m_FontPitchAndFamily As Byte
Dim m_FontOrientation As Byte
Dim m_FontWidth As Long
Dim m_FontWeight As Long
Dim m_FontOutPrecision As Byte
Dim m_FontClipPrecision As Byte
Dim m_FontQuality As Byte
Dim m_SimulateCaptionDrag As Boolean
Dim m_DrawMode As DrawModeConstants
Dim m_InverseShadow As Boolean
Dim m_DegradeeColor As OLE_COLOR
Dim m_DegradeeInit As OLE_COLOR
Dim m_ShadowDisplacementX As Integer
Dim m_ShadowDisplacementY As Integer
Dim m_Shadowed As Boolean
Dim m_Angle As Long
Dim m_Caption As String
Dim m_CaptionX As Long
Dim m_CaptionY As Long
Dim m_DegradeeSteps As Byte
Dim m_DegradeeStyle As rblStyles

Dim GetX As Single, GetY As Single

'Event Declarations:
Event InitProperties() 'MappingInfo=UserControl,UserControl,-1,InitProperties
Attribute InitProperties.VB_Description = "Occurs the first time a user control or user document is created."
Event DblClick() 'MappingInfo=UserControl,UserControl,-1,DblClick
Attribute DblClick.VB_Description = "Occurs when the user presses and releases a mouse button and then presses and releases it again over an object."
Event Click(X As Single, Y As Single, PointColor As OLE_COLOR) 'MappingInfo=UserControl,UserControl,-1,Click
Attribute Click.VB_Description = "An event that occurs whenever the user press the mouse button once on the surface of the control."
Event KeyDown(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyDown
Attribute KeyDown.VB_Description = "Occurs when the user presses a key while an object has the focus."
Event KeyPress(KeyAscii As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyPress
Attribute KeyPress.VB_Description = "Occurs when the user presses and releases an ANSI key."
Event KeyUp(KeyCode As Integer, Shift As Integer) 'MappingInfo=UserControl,UserControl,-1,KeyUp
Attribute KeyUp.VB_Description = "Occurs when the user releases a key while an object has the focus."
Event MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseMove
Attribute MouseMove.VB_Description = "Occurs when the user moves the mouse."
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseUp
Attribute MouseUp.VB_Description = "Occurs when the user releases the mouse button while an object has the focus."
Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=UserControl,UserControl,-1,MouseDown
Attribute MouseDown.VB_Description = "Occurs when the user presses the mouse button while an object has the focus."
Event Resize() 'MappingInfo=UserControl,UserControl,-1,Resize
Attribute Resize.VB_Description = "Occurs when a form is first displayed or the size of an object changes."
Sub DrawRotatedText()
Attribute DrawRotatedText.VB_Description = "Forces the redrawing of the Caption."
On Error GoTo DrawRotatedText_Error

If m_Caption = "" Then Exit Sub

Dim I_Font As LogFont, PrevFont As Long, hFont As Long, Ret As Long, FontSize As Integer, OldColor As Long

FontSize = UserControl.Font.Size

    With I_Font
    .lfHeight = (FontSize * -20) / Screen.TwipsPerPixelY
    .lfWidth = m_FontWidth
    .lfEscapement = m_Angle * 10
    .lfOrientation = m_FontOrientation
    .lfWeight = m_FontWeight
    .lfItalic = UserControl.Font.Italic
    .lfUnderline = UserControl.Font.Underline
    .lfStrikeOut = UserControl.Font.Strikethrough
    .lfCharSet = UserControl.Font.Charset
    .lfOutPrecision = m_FontOutPrecision
    .lfClipPrecision = m_FontClipPrecision
    .lfQuality = m_FontQuality
    .lfPitchAndFamily = m_FontPitchAndFamily
    .lfFaceName = UserControl.Font.Name & IIf(UserControl.Font.Bold, " Bold", "") & Chr$(0)
    End With

hFont = CreateFontIndirect(I_Font)

PrevFont = SelectObject(UserControl.hDC, hFont)

    If m_Shadowed Then
    UserControl.CurrentX = m_CaptionX + m_ShadowDisplacementX
    UserControl.CurrentY = m_CaptionY + m_ShadowDisplacementY
    OldColor = UserControl.ForeColor
    UserControl.ForeColor = UserControl.BackColor
    UserControl.Print m_Caption
    
        If m_InverseShadow Then
        UserControl.CurrentX = m_CaptionX - m_ShadowDisplacementX
        UserControl.CurrentY = m_CaptionY - m_ShadowDisplacementY
        UserControl.ForeColor = UserControl.BackColor Xor 16777215
        UserControl.Print m_Caption
        End If
                
    UserControl.ForeColor = OldColor
            
    End If

UserControl.CurrentX = m_CaptionX
UserControl.CurrentY = m_CaptionY
UserControl.Print m_Caption

' Clean up by restoring original font.

Ret = SelectObject(UserControl.hDC, PrevFont)
Ret = DeleteObject(hFont)

Exit Sub

DrawRotatedText_Error:
Stop
Exit Sub
End Sub
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Returns/sets the background color used to display text and graphics in an object."
BackColor = UserControl.BackColor
End Property
Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
UserControl.BackColor() = New_BackColor
PropertyChanged "BackColor"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,BorderStyle
Public Property Get BorderStyle() As Integer
Attribute BorderStyle.VB_Description = "Returns/sets the border style for an object."
BorderStyle = UserControl.BorderStyle
End Property
Public Property Let BorderStyle(ByVal New_BorderStyle As Integer)
UserControl.BorderStyle() = New_BorderStyle
PropertyChanged "BorderStyle"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Cls
Public Sub Cls()
Attribute Cls.VB_Description = "Clears graphics and text generated at run time from a Form, Image, or PictureBox."
UserControl.Cls
End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,CurrentX
Public Property Get CurrentX() As Single
Attribute CurrentX.VB_Description = "Returns/sets the horizontal coordinates for next print or draw method."
CurrentX = UserControl.CurrentX
End Property
Public Property Let CurrentX(ByVal New_CurrentX As Single)
UserControl.CurrentX() = New_CurrentX
PropertyChanged "CurrentX"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,CurrentY
Public Property Get CurrentY() As Single
Attribute CurrentY.VB_Description = "Returns/sets the vertical coordinates for next print or draw method."
CurrentY = UserControl.CurrentY
End Property
Public Property Let CurrentY(ByVal New_CurrentY As Single)
UserControl.CurrentY() = New_CurrentY
PropertyChanged "CurrentY"
End Property

Private Sub UserControl_DblClick()
RaiseEvent DblClick
End Sub
Private Sub UserControl_Click()
RaiseEvent Click(GetX, GetY, Point(GetX, GetY))
End Sub
Sub DrawDegradee()
Attribute DrawDegradee.VB_Description = "Forces redraw of Degradée."

On Error Resume Next

Dim Counter As Integer, CWidth As Long, CHeight As Long, _
NewRed As Integer, NewGreen As Integer, NewBlue As Integer, _
OldRed As Integer, OldGreen As Integer, OldBlue As Integer, _
VarRed As Integer, VarGreen As Integer, VarBlue As Integer, _
tempColor As Integer, flgHorizontal As Boolean, _
grpDisp As Single, m_DegradeeStepsToUse As Long

m_DegradeeStepsToUse = m_DegradeeSteps

    If m_DegradeeStyle = rbl_RightLeft Or m_DegradeeStyle = rbl_LeftRight Then
    
        If m_DegradeeStepsToUse > UserControl.ScaleWidth Then
        m_DegradeeStepsToUse = UserControl.ScaleWidth
        End If
    
    ElseIf m_DegradeeStyle = rbl_DownUp Or m_DegradeeStyle = rbl_UpDown Then
    
        If m_DegradeeStepsToUse > UserControl.ScaleHeight Then
        m_DegradeeStepsToUse = UserControl.ScaleHeight
        End If
        
    End If
    

    Select Case m_DegradeeStyle
    Case 0
    Me.Cls
    
    Case 1, 2, 3, 4
    OldRed = (m_DegradeeInit) Mod 256
    OldGreen = (Int(m_DegradeeInit / 256)) Mod 256
    OldBlue = (Int(m_DegradeeInit / 65536)) Mod 256
    
    NewRed = (m_DegradeeColor) Mod 256
    NewGreen = (Int(m_DegradeeColor / 256)) Mod 256
    NewBlue = (Int(m_DegradeeColor / 65536)) Mod 256
    
        If ((m_DegradeeStyle - 1) Mod 2) = 1 Then
        
        tempColor = NewRed: NewRed = OldRed: OldRed = tempColor
        tempColor = NewGreen: NewGreen = OldGreen: OldGreen = tempColor
        tempColor = NewBlue: NewBlue = OldBlue: OldBlue = tempColor
        
        End If
    
    VarRed = NewRed - OldRed
    VarGreen = NewGreen - OldGreen
    VarBlue = NewBlue - OldBlue
    
    flgHorizontal = (Int((m_DegradeeStyle - 1) / 2) = 1)
    
    CWidth = IIf(flgHorizontal, UserControl.ScaleWidth, UserControl.ScaleHeight)
    CHeight = IIf(flgHorizontal, UserControl.ScaleHeight, UserControl.ScaleWidth)
    
    grpDisp = CWidth / (m_DegradeeStepsToUse + 1)
    
        For Counter = 0 To m_DegradeeStepsToUse
        NewRed = OldRed + (VarRed * (Counter / m_DegradeeStepsToUse))
        NewGreen = OldGreen + (VarGreen * (Counter / m_DegradeeStepsToUse))
        NewBlue = OldBlue + (VarBlue * (Counter / m_DegradeeStepsToUse))
        
            If flgHorizontal Then
            UserControl.Line ((Counter * grpDisp), 0)-((Counter * grpDisp) + 1 + grpDisp, CHeight), _
            RGB(NewRed, NewGreen, NewBlue), BF
            
            Else
            UserControl.Line (0, (Counter * grpDisp))-(CHeight, (Counter * grpDisp) + 1 + grpDisp), _
            RGB(NewRed, NewGreen, NewBlue), BF
            
            End If
        
        Next Counter
    
    Case Else
    
    End Select

End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Font
Public Property Get Font() As Font
Attribute Font.VB_Description = "Returns a Font object."
Attribute Font.VB_UserMemId = -512
Set Font = UserControl.Font
End Property
Public Property Set Font(ByVal New_Font As Font)
Set UserControl.Font = New_Font
PropertyChanged "Font"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ForeColor
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object."
ForeColor = UserControl.ForeColor
End Property
Public Property Let ForeColor(ByVal New_ForeColor As OLE_COLOR)
UserControl.ForeColor() = New_ForeColor
PropertyChanged "ForeColor"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,hDC
Public Property Get hDC() As Long
Attribute hDC.VB_Description = "Returns a handle (from Microsoft Windows) to the object's device context."
hDC = UserControl.hDC
End Property
Private Sub UserControl_KeyDown(KeyCode As Integer, Shift As Integer)
RaiseEvent KeyDown(KeyCode, Shift)
End Sub
Private Sub UserControl_KeyPress(KeyAscii As Integer)
RaiseEvent KeyPress(KeyAscii)
End Sub
Private Sub UserControl_KeyUp(KeyCode As Integer, Shift As Integer)
RaiseEvent KeyUp(KeyCode, Shift)
End Sub
Private Sub UserControl_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseMove(Button, Shift, X, Y)
End Sub
Private Sub UserControl_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseUp(Button, Shift, X, Y)
End Sub
Private Sub UserControl_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

GetX = X
GetY = Y

RaiseEvent MouseDown(Button, Shift, X, Y)
Dim nRet&

    If m_SimulateCaptionDrag Then
    ReleaseCapture
    nRet = SendMessage(UserControl.ParentControls(0).hWnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&)
    End If

End Sub
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,MouseIcon
Public Property Get MouseIcon() As Picture
Attribute MouseIcon.VB_Description = "Sets a custom mouse icon."
Set MouseIcon = UserControl.MouseIcon
End Property
Public Property Set MouseIcon(ByVal New_MouseIcon As Picture)
Set UserControl.MouseIcon = New_MouseIcon
PropertyChanged "MouseIcon"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,MousePointer
Public Property Get MousePointer() As MousePointerConstants
Attribute MousePointer.VB_Description = "Returns/sets the type of mouse pointer displayed when over part of an object."
MousePointer = UserControl.MousePointer
End Property
Public Property Let MousePointer(ByVal New_MousePointer As MousePointerConstants)
UserControl.MousePointer() = New_MousePointer
PropertyChanged "MousePointer"
End Property
Private Sub UserControl_Resize()
RaiseEvent Resize
DrawDegradee
DrawRotatedText
End Sub
Public Property Get DegradeeStyle() As rblStyles
Attribute DegradeeStyle.VB_Description = "Returns/sets the style of the Degradée effect. 0 disables the Degradée."
DegradeeStyle = m_DegradeeStyle
End Property
Public Property Let DegradeeStyle(ByVal New_DegradeeStyle As rblStyles)
m_DegradeeStyle = New_DegradeeStyle
PropertyChanged "DegradeeStyle"
DrawDegradee
DrawRotatedText
End Property
'Initialize Properties for User Control
Private Sub UserControl_InitProperties()
    RaiseEvent InitProperties
Set Font = Ambient.Font
m_DegradeeStyle = m_def_DegradeeStyle
m_DegradeeSteps = m_def_DegradeeSteps
m_Caption = m_def_Caption
m_CaptionX = m_def_CaptionX
m_CaptionY = m_def_CaptionY
m_Angle = m_def_Angle
m_Shadowed = m_def_Shadowed
m_ShadowDisplacementX = m_def_ShadowDisplacementX
m_ShadowDisplacementY = m_def_ShadowDisplacementY
m_DegradeeColor = m_def_DegradeeColor
m_DegradeeInit = m_def_DegradeeInit
m_InverseShadow = m_def_InverseShadow
m_DrawMode = m_def_DrawMode
m_SimulateCaptionDrag = m_def_SimulateCaptionDrag
m_FontWidth = m_def_FontWidth
m_FontWeight = m_def_FontWeight
m_FontOutPrecision = m_def_FontOutPrecision
m_FontClipPrecision = m_def_FontClipPrecision
m_FontQuality = m_def_FontQuality
m_FontOrientation = m_def_FontOrientation

    m_FontPitchAndFamily = m_def_FontPitchAndFamily
End Sub
'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)

UserControl.AutoRedraw = PropBag.ReadProperty("AutoRedraw", True)
UserControl.BackColor = PropBag.ReadProperty("BackColor", &H8000000F)
UserControl.ForeColor = PropBag.ReadProperty("ForeColor", &H80000012)
UserControl.BorderStyle = PropBag.ReadProperty("BorderStyle", 0)
UserControl.CurrentX = PropBag.ReadProperty("CurrentX", 0)
UserControl.CurrentY = PropBag.ReadProperty("CurrentY", 0)
UserControl.MousePointer = PropBag.ReadProperty("MousePointer", 0)
UserControl.BackStyle = PropBag.ReadProperty("BackStyle", 1)
m_Angle = PropBag.ReadProperty("Angle", m_def_Angle)
m_Caption = PropBag.ReadProperty("Caption", m_def_Caption)
m_CaptionX = PropBag.ReadProperty("CaptionX", m_def_CaptionX)
m_CaptionY = PropBag.ReadProperty("CaptionY", m_def_CaptionY)
m_DegradeeColor = PropBag.ReadProperty("DegradeeColor", m_def_DegradeeColor)
m_DegradeeInit = PropBag.ReadProperty("DegradeeInit", m_def_DegradeeInit)
m_DegradeeSteps = PropBag.ReadProperty("DegradeeSteps", m_def_DegradeeSteps)
m_DegradeeStyle = PropBag.ReadProperty("DegradeeStyle", m_def_DegradeeStyle)
m_DrawMode = PropBag.ReadProperty("DrawMode", m_def_DrawMode)
m_FontClipPrecision = PropBag.ReadProperty("FontClipPrecision", m_def_FontClipPrecision)
m_FontOrientation = PropBag.ReadProperty("FontOrientation", m_def_FontOrientation)
m_FontOutPrecision = PropBag.ReadProperty("FontOutPrecision", m_def_FontOutPrecision)
m_FontQuality = PropBag.ReadProperty("FontQuality", m_def_FontQuality)
m_FontWeight = PropBag.ReadProperty("FontWeight", m_def_FontWeight)
m_FontWidth = PropBag.ReadProperty("FontWidth", m_def_FontWidth)
m_InverseShadow = PropBag.ReadProperty("InverseShadow", m_def_InverseShadow)
m_ShadowDisplacementX = PropBag.ReadProperty("ShadowDisplacementX", m_def_ShadowDisplacementX)
m_ShadowDisplacementY = PropBag.ReadProperty("ShadowDisplacementY", m_def_ShadowDisplacementY)
m_Shadowed = PropBag.ReadProperty("Shadowed", m_def_Shadowed)
m_SimulateCaptionDrag = PropBag.ReadProperty("SimulateCaptionDrag", m_def_SimulateCaptionDrag)
Set MouseIcon = PropBag.ReadProperty("MouseIcon", Nothing)
Set Picture = PropBag.ReadProperty("Picture", Nothing)
Set Font = PropBag.ReadProperty("Font", Ambient.Font)

    m_FontPitchAndFamily = PropBag.ReadProperty("FontPitchAndFamily", m_def_FontPitchAndFamily)
    UserControl.ScaleMode = PropBag.ReadProperty("ScaleMode", 3)
End Sub
'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)

Call PropBag.WriteProperty("BackColor", UserControl.BackColor, &H8000000F)
Call PropBag.WriteProperty("BorderStyle", UserControl.BorderStyle, 0)
Call PropBag.WriteProperty("CurrentX", UserControl.CurrentX, 0)
Call PropBag.WriteProperty("CurrentY", UserControl.CurrentY, 0)
Call PropBag.WriteProperty("Font", Font, Ambient.Font)
Call PropBag.WriteProperty("ForeColor", UserControl.ForeColor, &H80000012)
Call PropBag.WriteProperty("MouseIcon", MouseIcon, Nothing)
Call PropBag.WriteProperty("MousePointer", UserControl.MousePointer, 0)
Call PropBag.WriteProperty("DegradeeStyle", m_DegradeeStyle, m_def_DegradeeStyle)
Call PropBag.WriteProperty("DegradeeSteps", m_DegradeeSteps, m_def_DegradeeSteps)
Call PropBag.WriteProperty("Caption", m_Caption, m_def_Caption)
Call PropBag.WriteProperty("CaptionX", m_CaptionX, m_def_CaptionX)
Call PropBag.WriteProperty("CaptionY", m_CaptionY, m_def_CaptionY)
Call PropBag.WriteProperty("Angle", m_Angle, m_def_Angle)
Call PropBag.WriteProperty("Shadowed", m_Shadowed, m_def_Shadowed)
Call PropBag.WriteProperty("ShadowDisplacementX", m_ShadowDisplacementX, m_def_ShadowDisplacementX)
Call PropBag.WriteProperty("ShadowDisplacementY", m_ShadowDisplacementY, m_def_ShadowDisplacementY)
Call PropBag.WriteProperty("DegradeeColor", m_DegradeeColor, m_def_DegradeeColor)
Call PropBag.WriteProperty("DegradeeInit", m_DegradeeInit, m_def_DegradeeInit)
Call PropBag.WriteProperty("InverseShadow", m_InverseShadow, m_def_InverseShadow)
Call PropBag.WriteProperty("Picture", Picture, Nothing)
Call PropBag.WriteProperty("BackStyle", UserControl.BackStyle, 1)
Call PropBag.WriteProperty("AutoRedraw", UserControl.AutoRedraw, True)
Call PropBag.WriteProperty("DrawMode", m_DrawMode, m_def_DrawMode)
Call PropBag.WriteProperty("SimulateCaptionDrag", m_SimulateCaptionDrag, m_def_SimulateCaptionDrag)
Call PropBag.WriteProperty("FontWidth", m_FontWidth, m_def_FontWidth)
Call PropBag.WriteProperty("FontWeight", m_FontWeight, m_def_FontWeight)
Call PropBag.WriteProperty("FontOutPrecision", m_FontOutPrecision, m_def_FontOutPrecision)
Call PropBag.WriteProperty("FontClipPrecision", m_FontClipPrecision, m_def_FontClipPrecision)
Call PropBag.WriteProperty("FontQuality", m_FontQuality, m_def_FontQuality)
Call PropBag.WriteProperty("FontOrientation", m_FontOrientation, m_def_FontOrientation)
    Call PropBag.WriteProperty("FontPitchAndFamily", m_FontPitchAndFamily, m_def_FontPitchAndFamily)
    Call PropBag.WriteProperty("ScaleMode", UserControl.ScaleMode, 3)
End Sub
Public Property Get DegradeeSteps() As Byte
Attribute DegradeeSteps.VB_Description = "Returns/sets the number of steps used by the Degradée effect."
DegradeeSteps = m_DegradeeSteps
End Property
Public Property Let DegradeeSteps(ByVal New_DegradeeSteps As Byte)
m_DegradeeSteps = New_DegradeeSteps
PropertyChanged "DegradeeSteps"
DrawDegradee
DrawRotatedText
End Property
Public Property Get Caption() As String
Attribute Caption.VB_Description = "Returns/sets the text to be displayed on the control."
Caption = m_Caption
End Property
Public Property Let Caption(ByVal New_Caption As String)
m_Caption = New_Caption
PropertyChanged "Caption"
DrawDegradee
DrawRotatedText
End Property
Public Property Get CaptionX() As Long
Attribute CaptionX.VB_Description = "Returns/sets the X Axis position of the text."
CaptionX = m_CaptionX
End Property
Public Property Let CaptionX(ByVal New_CaptionX As Long)
m_CaptionX = New_CaptionX
PropertyChanged "CaptionX"
DrawDegradee
DrawRotatedText
End Property
Public Property Get CaptionY() As Long
Attribute CaptionY.VB_Description = "Returns/sets the Y Axis position of the text."
CaptionY = m_CaptionY
End Property
Public Property Let CaptionY(ByVal New_CaptionY As Long)
m_CaptionY = New_CaptionY
PropertyChanged "CaptionY"
DrawDegradee
DrawRotatedText
End Property
Public Property Get Angle() As Long
Attribute Angle.VB_Description = "Returns/sets the inclination (in Degrees) of the caption."
Angle = m_Angle
End Property
Public Function Pixel(X, Y) As Long
Pixel = UserControl.Point(X, Y)
End Function

Public Property Let Angle(ByVal New_Angle As Long)
m_Angle = New_Angle
PropertyChanged "Angle"
DrawDegradee
DrawRotatedText
End Property
Public Property Get Shadowed() As Boolean
Attribute Shadowed.VB_Description = "Returns/sets a boolean tha indicates the use of a Shadow text."
Shadowed = m_Shadowed
End Property
Public Property Let Shadowed(ByVal New_Shadowed As Boolean)
m_Shadowed = New_Shadowed
PropertyChanged "Shadowed"
DrawDegradee
DrawRotatedText
End Property
Public Property Get ShadowDisplacementX() As Integer
Attribute ShadowDisplacementX.VB_Description = "Returns/sets the shadow displacement X coordinate."
ShadowDisplacementX = m_ShadowDisplacementX
End Property
Public Property Let ShadowDisplacementX(ByVal New_ShadowDisplacementX As Integer)
m_ShadowDisplacementX = New_ShadowDisplacementX
PropertyChanged "ShadowDisplacementX"
DrawDegradee
DrawRotatedText
End Property
Public Property Get ShadowDisplacementY() As Integer
Attribute ShadowDisplacementY.VB_Description = "Returns/sets the shadow displacement Y coordinate."
ShadowDisplacementY = m_ShadowDisplacementY
End Property
Public Property Let ShadowDisplacementY(ByVal New_ShadowDisplacementY As Integer)
m_ShadowDisplacementY = New_ShadowDisplacementY
PropertyChanged "ShadowDisplacementY"
DrawDegradee
DrawRotatedText
End Property
Public Property Get DegradeeColor() As OLE_COLOR
Attribute DegradeeColor.VB_Description = "Returns/sets the Final color of the Degradée effect."
DegradeeColor = m_DegradeeColor
End Property
Public Property Let DegradeeColor(ByVal New_DegradeeColor As OLE_COLOR)
m_DegradeeColor = New_DegradeeColor
PropertyChanged "DegradeeColor"
DrawDegradee
DrawRotatedText
End Property
Public Property Get DegradeeInit() As OLE_COLOR
Attribute DegradeeInit.VB_Description = "Returns/sets the initial color of the Degradée effect."
DegradeeInit = m_DegradeeInit
End Property
Public Property Let DegradeeInit(ByVal New_DegradeeInit As OLE_COLOR)
m_DegradeeInit = New_DegradeeInit
PropertyChanged "DegradeeInit"
DrawDegradee
DrawRotatedText
End Property
Public Property Get InverseShadow() As Boolean
Attribute InverseShadow.VB_Description = "Returns/sets a boolean that indicates the use of a 'drop shadow' relative to the normal shadow."
InverseShadow = m_InverseShadow
End Property
Public Property Let InverseShadow(ByVal New_InverseShadow As Boolean)
m_InverseShadow = New_InverseShadow
PropertyChanged "InverseShadow"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Picture
Public Property Get Picture() As Picture
Attribute Picture.VB_Description = "Returns/sets a graphic to be displayed in a control."
Set Picture = UserControl.Picture
End Property
Public Property Set Picture(ByVal New_Picture As Picture)
Set UserControl.Picture = New_Picture
PropertyChanged "Picture"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,AutoRedraw
Public Property Get AutoRedraw() As Boolean
Attribute AutoRedraw.VB_Description = "Returns/sets the output from a graphics method to a persistent bitmap."
AutoRedraw = UserControl.AutoRedraw
End Property
Public Property Let AutoRedraw(ByVal New_AutoRedraw As Boolean)
UserControl.AutoRedraw() = New_AutoRedraw
PropertyChanged "AutoRedraw"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,Appearance
Public Property Get Appearance() As Integer
Attribute Appearance.VB_Description = "Returns/sets whether or not an object is painted at run time with 3-D effects."
Appearance = UserControl.Appearance
End Property
Public Property Get DrawMode() As DrawModeConstants
Attribute DrawMode.VB_Description = "Sets the appearance of output from graphics methods or of a Shape or Line control."
DrawMode = m_DrawMode
End Property
Public Property Let DrawMode(ByVal New_DrawMode As DrawModeConstants)
m_DrawMode = New_DrawMode
PropertyChanged "DrawMode"
Me.Cls
DrawDegradee
DrawRotatedText
End Property
Public Property Get SimulateCaptionDrag() As Boolean
Attribute SimulateCaptionDrag.VB_Description = "Returns/sets a boolean that indicates when the control is used to substitute the normal Caption Bar on the Drag function."
SimulateCaptionDrag = m_SimulateCaptionDrag
End Property
Public Property Let SimulateCaptionDrag(ByVal New_SimulateCaptionDrag As Boolean)
m_SimulateCaptionDrag = New_SimulateCaptionDrag
PropertyChanged "SimulateCaptionDrag"
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,hWnd
Public Property Get hWnd() As Long
Attribute hWnd.VB_Description = "Returns a handle (from Microsoft Windows) to an object's window."
hWnd = UserControl.hWnd
End Property
Public Property Get FontWidth() As Long
FontWidth = m_FontWidth
End Property
Public Property Let FontWidth(ByVal New_FontWidth As Long)
m_FontWidth = New_FontWidth
PropertyChanged "FontWidth"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontWeight() As Long
FontWeight = m_FontWeight
End Property
Public Property Let FontWeight(ByVal New_FontWeight As Long)
m_FontWeight = New_FontWeight
PropertyChanged "FontWeight"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontOutPrecision() As Byte
FontOutPrecision = m_FontOutPrecision
End Property
Public Property Let FontOutPrecision(ByVal New_FontOutPrecision As Byte)
m_FontOutPrecision = New_FontOutPrecision
PropertyChanged "FontOutPrecision"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontClipPrecision() As Byte
FontClipPrecision = m_FontClipPrecision
End Property
Public Property Let FontClipPrecision(ByVal New_FontClipPrecision As Byte)
m_FontClipPrecision = New_FontClipPrecision
PropertyChanged "FontClipPrecision"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontQuality() As Byte
FontQuality = m_FontQuality
End Property
Public Property Let FontQuality(ByVal New_FontQuality As Byte)
m_FontQuality = New_FontQuality
PropertyChanged "FontQuality"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontOrientation() As Byte
FontOrientation = m_FontOrientation
End Property
Public Property Let FontOrientation(ByVal New_FontOrientation As Byte)
m_FontOrientation = New_FontOrientation
PropertyChanged "FontOrientation"
DrawDegradee
DrawRotatedText
End Property
Public Property Get FontPitchAndFamily() As Byte
    FontPitchAndFamily = m_FontPitchAndFamily
End Property
Public Property Let FontPitchAndFamily(ByVal New_FontPitchAndFamily As Byte)
m_FontPitchAndFamily = New_FontPitchAndFamily
PropertyChanged "FontPitchAndFamily"
DrawDegradee
DrawRotatedText
End Property
'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=UserControl,UserControl,-1,ScaleMode
Public Property Get ScaleMode() As ScaleModeConstants
Attribute ScaleMode.VB_Description = "Returns/sets a value indicating measurement units for object coordinates when using graphics methods or positioning controls."
    ScaleMode = UserControl.ScaleMode
End Property

Public Property Let ScaleMode(ByVal New_ScaleMode As ScaleModeConstants)
    UserControl.ScaleMode() = New_ScaleMode
    PropertyChanged "ScaleMode"
    DrawDegradee
    DrawRotatedText
End Property
