VERSION 5.00
Begin VB.UserControl DoublePanel 
   Alignable       =   -1  'True
   BackColor       =   &H00404040&
   ClientHeight    =   3600
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   4800
   ControlContainer=   -1  'True
   ScaleHeight     =   240
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   320
   ToolboxBitmap   =   "DoublePanel.ctx":0000
   Begin VB.PictureBox picMarker 
      BorderStyle     =   0  'None
      Height          =   2130
      Left            =   2430
      MousePointer    =   5  'Size
      ScaleHeight     =   142
      ScaleMode       =   3  'Pixel
      ScaleWidth      =   9
      TabIndex        =   0
      Top             =   1035
      Width           =   135
      Begin Synapsis.MaskImage mskRug 
         Height          =   720
         Left            =   15
         TabIndex        =   1
         Top             =   630
         Width           =   90
         _ExtentX        =   159
         _ExtentY        =   1270
         Picture         =   "DoublePanel.ctx":0312
         MaskPicture     =   "DoublePanel.ctx":0724
         MousePointer    =   5
      End
      Begin VB.Line lneDeco 
         BorderColor     =   &H00000000&
         Index           =   1
         X1              =   8
         X2              =   8
         Y1              =   12
         Y2              =   117
      End
      Begin VB.Line lneDeco 
         BorderColor     =   &H00FFFFFF&
         Index           =   0
         X1              =   0
         X2              =   0
         Y1              =   12
         Y2              =   117
      End
   End
End
Attribute VB_Name = "DoublePanel"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Dim uDrag  As Boolean
Dim uOriginPos As POINTAPI, uOriginX As Long

Event MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=mskRug,mskRug,-1,MouseDown
Event MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single) 'MappingInfo=mskRug,mskRug,-1,MouseUp
Event Click()
Private Sub picMarker_Click()
RaiseEvent Click
End Sub
Private Sub picMarker_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub
Private Sub picMarker_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)
RaiseEvent MouseDown(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_Resize()

    With UserControl
    
        If .picMarker.Left + .picMarker.Width > .ScaleWidth Then
        .picMarker.Left = .ScaleWidth - .picMarker.Width
        End If
        
        If .picMarker.Left < 0 Then
        .picMarker.Left = 0
        End If
        
    End With
    
Call Draw
End Sub
Private Sub UserControl_Initialize()
Call Draw
End Sub
Sub Draw()
On Error Resume Next
    
    With UserControl
    .picMarker.Top = 0
    .picMarker.Height = .ScaleHeight
    
    .lneDeco(0).Y1 = 0
    .lneDeco(0).Y2 = .picMarker.ScaleHeight
    .lneDeco(1).Y1 = 0
    .lneDeco(1).Y2 = .picMarker.ScaleHeight
    
    .mskRug.Top = .picMarker.ScaleHeight / 2 - .mskRug.Height / 2
    .picMarker.Left = 0
    .Width = .picMarker.Width * Screen.TwipsPerPixelX
    
    End With

End Sub
Private Sub UserControl_Click()
RaiseEvent Click
End Sub
Private Sub mskRug_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseDown(Button, Shift, X, Y)
End Sub
Private Sub mskRug_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
RaiseEvent MouseUp(Button, Shift, X, Y)
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
picMarker.BackColor = New_BackColor
PropertyChanged "BackColor"
End Property
Private Sub UserControl_ReadProperties(PropBag As PropertyBag)
UserControl.BackColor = PropBag.ReadProperty("BackColor", &H8000000F)
picMarker.BackColor = UserControl.BackColor
End Sub
Private Sub UserControl_WriteProperties(PropBag As PropertyBag)
Call PropBag.WriteProperty("BackColor", UserControl.BackColor, &H8000000F)
End Sub
