VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "自由变色"
   ClientHeight    =   6150
   ClientLeft      =   120
   ClientTop       =   450
   ClientWidth     =   7950
   LinkTopic       =   "Form1"
   ScaleHeight     =   6150
   ScaleWidth      =   7950
   StartUpPosition =   3  '窗口缺省
   Begin VB.HScrollBar HScroll3 
      Height          =   615
      LargeChange     =   5
      Left            =   1560
      Max             =   255
      TabIndex        =   4
      Top             =   5280
      Width           =   3375
   End
   Begin VB.HScrollBar HScroll2 
      Height          =   615
      LargeChange     =   5
      Left            =   1560
      Max             =   255
      TabIndex        =   3
      Top             =   4320
      Width           =   3375
   End
   Begin VB.HScrollBar HScroll1 
      Height          =   615
      LargeChange     =   5
      Left            =   1560
      Max             =   255
      TabIndex        =   2
      Top             =   3360
      Width           =   3375
   End
   Begin VB.VScrollBar VScroll1 
      Height          =   3375
      LargeChange     =   5
      Left            =   6720
      Max             =   100
      TabIndex        =   1
      Top             =   1320
      Width           =   495
   End
   Begin VB.TextBox Text1 
      Height          =   1575
      Left            =   1080
      TabIndex        =   0
      Top             =   360
      Width           =   3855
   End
   Begin VB.Label Label4 
      Height          =   375
      Left            =   6360
      TabIndex        =   8
      Top             =   600
      Width           =   855
   End
   Begin VB.Label Label3 
      Caption         =   "蓝色"
      Height          =   615
      Left            =   720
      TabIndex        =   7
      Top             =   5280
      Width           =   615
   End
   Begin VB.Label Label2 
      Caption         =   "绿色"
      Height          =   375
      Left            =   720
      TabIndex        =   6
      Top             =   4440
      Width           =   615
   End
   Begin VB.Label Label1 
      Caption         =   "红色"
      Height          =   495
      Left            =   840
      TabIndex        =   5
      Top             =   3480
      Width           =   495
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim iwidth As Integer, iheight As Integer

Private Sub Form_Load()
iwidth = Text1.Width
iheight = Text1.Height
Label4.Caption = "100%"
End Sub

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

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

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

Private Sub VScroll1_Change()
Text1.Width = iwidth * (VScroll1.Value / 100)
Text1.Height = iheight * (VScroll1.Value / 100)
Label4.Caption = VScroll1.Value & "%"
End Sub
