VERSION 5.00
Begin VB.Form frmColorBar 
   Caption         =   "Color Bar"
   ClientHeight    =   3465
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3885
   LinkTopic       =   "Form1"
   ScaleHeight     =   3465
   ScaleWidth      =   3885
   StartUpPosition =   3  'Windows Default
   Begin VB.HScrollBar hsbBlue 
      Height          =   255
      LargeChange     =   25
      Left            =   480
      Max             =   255
      TabIndex        =   2
      Top             =   2520
      Width           =   2895
   End
   Begin VB.HScrollBar hsbGreen 
      Height          =   255
      LargeChange     =   25
      Left            =   480
      Max             =   255
      TabIndex        =   1
      Top             =   2160
      Width           =   2895
   End
   Begin VB.HScrollBar hsbRed 
      Height          =   255
      LargeChange     =   25
      Left            =   480
      Max             =   255
      TabIndex        =   0
      Top             =   1800
      Width           =   2895
   End
   Begin VB.Label lblHex 
      AutoSize        =   -1  'True
      Caption         =   "Hex Value"
      Height          =   195
      Left            =   120
      TabIndex        =   11
      Top             =   3000
      Width           =   735
   End
   Begin VB.Label lblHexValue 
      Alignment       =   1  'Right Justify
      BorderStyle     =   1  'Fixed Single
      Caption         =   "000000"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   13.5
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   495
      Left            =   960
      TabIndex        =   10
      Top             =   2880
      Width           =   1095
   End
   Begin VB.Label lbl3 
      AutoSize        =   -1  'True
      Caption         =   "blue"
      ForeColor       =   &H00FF0000&
      Height          =   195
      Left            =   120
      TabIndex        =   9
      Top             =   2520
      Width           =   300
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "green"
      ForeColor       =   &H0000FF00&
      Height          =   195
      Left            =   0
      TabIndex        =   8
      Top             =   2160
      Width           =   405
   End
   Begin VB.Label lbl1 
      AutoSize        =   -1  'True
      Caption         =   "red"
      ForeColor       =   &H000000FF&
      Height          =   195
      Left            =   120
      TabIndex        =   7
      Top             =   1800
      Width           =   225
   End
   Begin VB.Label lblPrompt 
      AutoSize        =   -1  'True
      Caption         =   "Move the scroll bars to change colors!"
      BeginProperty Font 
         Name            =   "MS Sans Serif"
         Size            =   8.25
         Charset         =   0
         Weight          =   700
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   195
      Left            =   240
      TabIndex        =   6
      Top             =   120
      Width           =   3285
   End
   Begin VB.Shape shpColorBox 
      FillStyle       =   0  'Solid
      Height          =   1215
      Left            =   120
      Top             =   480
      Width           =   3615
   End
   Begin VB.Label lblBluevalue 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      Height          =   255
      Left            =   3480
      TabIndex        =   5
      Top             =   2520
      Width           =   375
   End
   Begin VB.Label lblGreenValue 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      Height          =   255
      Left            =   3480
      TabIndex        =   4
      Top             =   2160
      Width           =   375
   End
   Begin VB.Label lblRedValue 
      BorderStyle     =   1  'Fixed Single
      Caption         =   "0"
      Height          =   255
      Left            =   3480
      TabIndex        =   3
      Top             =   1800
      Width           =   375
   End
End
Attribute VB_Name = "frmColorBar"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim intRed As Integer
Dim intGreen As Integer
Dim intblue As Integer

Private Sub hsbBlue_Change()
lblBluevalue.Caption = hsbBlue.Value

intblue = hsbBlue.Value

shpColorBox.FillColor = RGB(intRed, intGreen, intblue)

If hsbBlue.Value <= 10 Then
    lblHexValue.Caption = Hex(intRed) & Hex(intGreen) & "0" & Hex(intblue)
Else
lblHexValue.Caption = Hex(intRed) & Hex(intGreen) & Hex(intblue)
End If
End Sub

Private Sub hsbBlue_Scroll()
lblBluevalue.Caption = hsbBlue.Value
intblue = hsbBlue.Value
shpColorBox.FillColor = RGB(intRed, intGreen, intblue)
End Sub

Private Sub hsbGreen_Change()
lblGreenValue.Caption = hsbGreen.Value
intGreen = hsbGreen.Value
shpColorBox.FillColor = RGB(intRed, intGreen, intblue)
If hsbGreen.Value <= 10 Then
    lblHexValue.Caption = Hex(intRed) & "0" & Hex(intGreen) & Hex(intblue)
Else
lblHexValue.Caption = Hex(intRed) & Hex(intGreen) & Hex(intblue)
End If
End Sub

Private Sub hsbGreen_Scroll()
lblGreenValue.Caption = hsbGreen.Value
intGreen = hsbGreen.Value
shpColorBox.FillColor = RGB(intRed, intGreen, intblue)
End Sub

Private Sub hsbRed_Change()
lblRedValue.Caption = hsbRed.Value
intRed = hsbRed.Value
shpColorBox.FillColor = RGB(intRed, intGreen, intblue)
If hsbRed.Value <= 10 Then
    lblHexValue.Caption = "0" & Hex(intRed) & Hex(intGreen) & Hex(intblue)
Else
lblHexValue.Caption = Hex(intRed) & Hex(intGreen) & Hex(intblue)
End If
End Sub

Private Sub hsbRed_Scroll()
lblRedValue.Caption = hsbRed.Value
intRed = hsbRed.Value
shpColorBox.FillColor = RGB(intRed, intGreen, intblue)
End Sub

Private Sub lblHexVale_Click()

End Sub
