VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "色彩混合"
   ClientHeight    =   3090
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   3540
   LinkTopic       =   "Form1"
   ScaleHeight     =   3090
   ScaleWidth      =   3540
   StartUpPosition =   3  '窗口缺省
   Begin VB.Frame Frame1 
      Caption         =   "调色区"
      Height          =   1455
      Left            =   240
      TabIndex        =   2
      Top             =   720
      Width           =   3015
      Begin VB.CheckBox chkRed 
         Caption         =   "红色"
         Height          =   375
         Left            =   120
         TabIndex        =   5
         Top             =   240
         Width           =   855
      End
      Begin VB.CheckBox chkBlue 
         Caption         =   "蓝色"
         Height          =   375
         Left            =   120
         TabIndex        =   4
         Top             =   600
         Width           =   855
      End
      Begin VB.CheckBox chkGreen 
         Caption         =   "绿色"
         Height          =   375
         Left            =   120
         TabIndex        =   3
         Top             =   960
         Width           =   855
      End
      Begin VB.Label Label2 
         BorderStyle     =   1  'Fixed Single
         Height          =   1095
         Left            =   1320
         TabIndex        =   6
         Top             =   240
         Width           =   1455
      End
   End
   Begin VB.CommandButton Command1 
      Caption         =   "混合"
      Height          =   495
      Left            =   1200
      TabIndex        =   0
      Top             =   2280
      Width           =   735
   End
   Begin VB.Label Label1 
      Caption         =   "色彩混合"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   15.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00000000&
      Height          =   375
      Left            =   1080
      TabIndex        =   1
      Top             =   240
      Width           =   1575
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
    Dim r As Integer, b As Integer, g As Integer
    r = 0                                       '初始化各颜色值
    b = 0
    g = 0
    If chkRed.Value = 1 Then r = 255            '如果chkRed复选框被选中，则设置红色为255
    If chkBlue.Value = 1 Then b = 255           '如果chkBlue复选框被选中，则设置蓝色为255         '
    If chkGreen.Value = 1 Then g = 255          '如果chkGreen复选框被选中，则设置绿色为255
    Label2.BackColor = RGB(r, g, b)             '设置标签Label2的背景色
End Sub
