VERSION 5.00 Begin VB.UserControl badScroller ClientHeight = 720 ClientLeft = 0 ClientTop = 0 ClientWidth = 615 ScaleHeight = 720 ScaleWidth = 615 Begin VB.HScrollBar scrColor Height = 375 Left = 0 Max = 15 TabIndex = 1 Top = 360 Width = 615 End Begin VB.PictureBox picColor Height = 375 Left = 0 ScaleHeight = 315 ScaleWidth = 555 TabIndex = 0 Top = 0 Width = 615 End End Attribute VB_Name = "badScroller" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = False 'Event Declarations: Event Change() 'MappingInfo=scrColor,scrColor,-1,Change Attribute Change.VB_Description = "Occurs when the contents of a control have changed." Private Sub scrColor_Change() picColor.BackColor = QBColor(scrColor.Value) Me.color = picColor.BackColor ' I added this RaiseEvent Change 'I moved this to the bottom End Sub 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=UserControl,UserControl,-1,Enabled Public Property Get Enabled() As Boolean Attribute Enabled.VB_Description = "Returns/sets a value that determines whether an object can respond to user-generated events." Enabled = UserControl.Enabled End Property Public Property Let Enabled(ByVal New_Enabled As Boolean) UserControl.Enabled() = New_Enabled PropertyChanged "Enabled" End Property 'WARNING! DO NOT REMOVE OR MODIFY THE FOLLOWING COMMENTED LINES! 'MappingInfo=picColor,picColor,-1,ForeColor Public Property Get color() As OLE_COLOR Attribute color.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object." color = picColor.ForeColor End Property Public Property Let color(ByVal New_color As OLE_COLOR) picColor.ForeColor() = New_color PropertyChanged "color" End Property 'Load property values from storage Private Sub UserControl_ReadProperties(PropBag As PropertyBag) UserControl.Enabled = PropBag.ReadProperty("Enabled", True) picColor.ForeColor = PropBag.ReadProperty("color", &H80000012) End Sub 'Write property values to storage Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("Enabled", UserControl.Enabled, True) Call PropBag.WriteProperty("color", picColor.ForeColor, &H80000012) End Sub