Public Class Form1
    Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        TextBox1.BackColor = Lblcolor.BackColor
        '将textBox1的背景设置为预设的颜色 
    End Sub
    Private Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
        TextBox1.ForeColor = Lblcolor.BackColor
        '将textBox1的字体设为预设的颜色 
    End Sub
    Private Sub HsbR_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HsbR.ValueChanged
        Lblcolor.BackColor = Color.FromArgb(HsbR.Value, HsbG.Value, HsbB.Value)
        Me.Text = HsbR.Value
    End Sub

    Private Sub HsbG_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HsbG.ValueChanged
        Lblcolor.BackColor = Color.FromArgb(HsbR.Value, HsbG.Value, HsbB.Value)
    End Sub

    Private Sub HsbB_ValueChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles HsbB.ValueChanged
        Lblcolor.BackColor = Color.FromArgb(HsbR.Value, HsbG.Value, HsbB.Value)
    End Sub
End Class
