VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.UserControl colorBox 
   ClientHeight    =   300
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   1080
   ScaleHeight     =   300
   ScaleWidth      =   1080
   Begin VB.CommandButton Command1 
      Caption         =   "Clear"
      Height          =   300
      Left            =   270
      TabIndex        =   1
      Top             =   0
      Width           =   795
   End
   Begin MSComDlg.CommonDialog Dialog 
      Left            =   750
      Top             =   660
      _ExtentX        =   847
      _ExtentY        =   847
      _Version        =   393216
   End
   Begin VB.Shape shpBorder 
      BorderColor     =   &H80000001&
      Height          =   255
      Left            =   0
      Top             =   15
      Width           =   255
   End
   Begin VB.Label lblL 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      ForeColor       =   &H80000008&
      Height          =   255
      Left            =   0
      TabIndex        =   0
      Top             =   15
      Width           =   255
   End
End
Attribute VB_Name = "colorBox"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
'Dim m_TiesWith As Object
'Property Variables:
Dim m_TiesWithBorder As Object
Dim m_TiesWithFore As Object
Dim m_TiesWithBack As Object
Dim m_TiesWithFill As Object

Private Sub Command1_Click()
    lblL.BackStyle = 0
End Sub

Private Sub lblL_Click()
    On Error Resume Next
    dialog.ShowColor
    If dialog.Color <> 0 Then
        lblL.BackStyle = 1
        lblL.BackColor = dialog.Color
        If Not TiesWithFore Is Nothing Then TiesWithFore.ForeColor = dialog.Color
        If Not TiesWithBack Is Nothing Then TiesWithBack.BackColor = dialog.Color
        If Not TiesWithFill Is Nothing Then TiesWithFill.FillColor = dialog.Color
        If Not TiesWithBorder Is Nothing Then TiesWithBorder.BorderColor = dialog.Color
    End If
End Sub

'Load property values from storage
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
    lblL.BackColor = PropBag.ReadProperty("BackColor", &H80000005)
    lblL.BackStyle = PropBag.ReadProperty("BackStyle", 1)
'    Set m_TiesWith = PropBag.ReadProperty("TiesWith", Nothing)
    Set m_TiesWithFore = PropBag.ReadProperty("TiesWithFore", Nothing)
    Set m_TiesWithBack = PropBag.ReadProperty("TiesWithBack", Nothing)
    Set m_TiesWithFill = PropBag.ReadProperty("TiesWithFill", Nothing)
    Set m_TiesWithBorder = PropBag.ReadProperty("TiesWithBorder", Nothing)
End Sub

Private Sub UserControl_Resize()
    Exit Sub
End Sub

'Write property values to storage
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
    Call PropBag.WriteProperty("BackColor", lblL.BackColor, &H80000005)
    Call PropBag.WriteProperty("BackStyle", lblL.BackStyle, 1)
'    Call PropBag.WriteProperty("TiesWith", m_TiesWith, Nothing)
    Call PropBag.WriteProperty("TiesWithFore", m_TiesWith, Nothing)
    Call PropBag.WriteProperty("TiesWithBack", m_TiesWithBack, Nothing)
    Call PropBag.WriteProperty("TiesWithFill", m_TiesWithFill, Nothing)
    Call PropBag.WriteProperty("TiesWithBorder", m_TiesWithBorder, Nothing)
End Sub

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lblL,lblL,-1,BackColor
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 = lblL.BackColor
End Property

Public Property Let BackColor(ByVal New_BackColor As OLE_COLOR)
    lblL.BackColor() = New_BackColor
    PropertyChanged "BackColor"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MappingInfo=lblL,lblL,-1,BackStyle
Public Property Get BackStyle() As Integer
Attribute BackStyle.VB_Description = "Indicates whether a Label or the background of a Shape is transparent or opaque."
    BackStyle = lblL.BackStyle
End Property

Public Property Let BackStyle(ByVal New_BackStyle As Integer)
    lblL.BackStyle() = New_BackStyle
    PropertyChanged "BackStyle"
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=9,0,0,0
Public Property Get TiesWithFore() As Object
Attribute TiesWithFore.VB_Description = "Changes forecolor of object specified"
    Set TiesWithFore = m_TiesWithFore
End Property

Public Property Set TiesWithFore(ByVal New_TiesWithFore As Object)
    Set m_TiesWithFore = New_TiesWithFore
    PropertyChanged "TiesWithFore"
    If Not TiesWithFore Is Nothing Then lblL.BackColor = TiesWithFore.ForeColor
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=9,0,0,0
Public Property Get TiesWithBack() As Object
Attribute TiesWithBack.VB_Description = "Changes backcolor of object specified"
    Set TiesWithBack = m_TiesWithBack
End Property

Public Property Set TiesWithBack(ByVal New_TiesWithBack As Object)
    Set m_TiesWithBack = New_TiesWithBack
    PropertyChanged "TiesWithBack"
    If Not TiesWithBack Is Nothing Then lblL.BackColor = TiesWithBack.BackColor
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=9,0,0,0
Public Property Get TiesWithFill() As Object
Attribute TiesWithFill.VB_Description = "Changes fillcolor of object specified"
    Set TiesWithFill = m_TiesWithFill
End Property

Public Property Set TiesWithFill(ByVal New_TiesWithFill As Object)
    Set m_TiesWithFill = New_TiesWithFill
    PropertyChanged "TiesWithFill"
    If Not TiesWithFill Is Nothing Then lblL.BackColor = TiesWithFill.FillColor
End Property

'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES!
'MemberInfo=9,0,0,0
Public Property Get TiesWithBorder() As Object
Attribute TiesWithBorder.VB_Description = "Changes fillcolor of object specified"
    Set TiesWithBorder = m_TiesWithBorder
End Property

Public Property Set TiesWithBorder(ByVal New_TiesWithBorder As Object)
    Set m_TiesWithBorder = New_TiesWithBorder
    PropertyChanged "TiesWithBorder"
    If Not TiesWithBorder Is Nothing Then lblL.BackColor = TiesWithBorder.BorderColor
End Property
