VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "调色板"
   ClientHeight    =   2985
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4590
   LinkTopic       =   "Form1"
   ScaleHeight     =   2985
   ScaleWidth      =   4590
   StartUpPosition =   3  '窗口缺省
   Begin VB.TextBox Text1 
      Height          =   495
      Left            =   2760
      TabIndex        =   9
      Top             =   720
      Width           =   1335
   End
   Begin VB.CommandButton Command2 
      Caption         =   "设置前景颜色"
      Height          =   375
      Left            =   720
      TabIndex        =   8
      Top             =   1800
      Width           =   1455
   End
   Begin VB.CommandButton Command1 
      Caption         =   "设置背景颜色"
      Height          =   375
      Left            =   720
      TabIndex        =   7
      Top             =   2400
      Width           =   1455
   End
   Begin VB.TextBox Text2 
      Height          =   375
      Left            =   2760
      TabIndex        =   6
      Text            =   "这是一个文本框"
      Top             =   1920
      Width           =   1455
   End
   Begin VB.HScrollBar HScroll3 
      Height          =   255
      Left            =   360
      Max             =   255
      TabIndex        =   2
      Top             =   1200
      Width           =   1935
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   255
      Left            =   360
      Max             =   255
      TabIndex        =   1
      Top             =   240
      Width           =   1935
   End
   Begin VB.HScrollBar HScroll2 
      Height          =   255
      Left            =   360
      Max             =   255
      TabIndex        =   0
      Top             =   720
      Width           =   1935
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "兰"
      Height          =   180
      Left            =   120
      TabIndex        =   5
      Top             =   1200
      Width           =   180
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "绿"
      Height          =   180
      Left            =   120
      TabIndex        =   4
      Top             =   720
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "红"
      Height          =   180
      Left            =   120
      TabIndex        =   3
      Top             =   240
      Width           =   180
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim Red, Green, Blue As Long

Private Sub Command1_Click()
    Text2.BackColor = Text1.BackColor
End Sub

Private Sub Command2_Click()
    Text2.ForeColor = Text1.BackColor
End Sub

Private Sub HScroll1_Change()
    Red = HScroll1.Value
    Green = HScroll2.Value
    Blue = HScroll3.Value
    Text1.BackColor = RGB(Red, Green, Blue)
End Sub

Private Sub HScroll2_Change()
    Red = HScroll1.Value
    Green = HScroll2.Value
    Blue = HScroll3.Value
    Text1.BackColor = RGB(Red, Green, Blue)
End Sub

Private Sub HScroll3_Change()
    Red = HScroll1.Value
    Green = HScroll2.Value
    Blue = HScroll3.Value
    Text1.BackColor = RGB(Red, Green, Blue)
End Sub
