2019年4月8日 星期一

調色盤ColorV2



Public Class Form1
    Private Sub TrackBar1_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar1.Scroll
        PictureBox4.BackColor = Color.FromArgb(TrackBar1.Value, TrackBar2.Value, TrackBar3.Value)
        Label1.Text = TrackBar1.Value
        PictureBox1.BackColor = Color.FromArgb(TrackBar1.Value, 0, 0)
    End Sub

    Private Sub TrackBar2_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar2.Scroll
        PictureBox4.BackColor = Color.FromArgb(TrackBar1.Value, TrackBar2.Value, TrackBar3.Value)
        Label2.Text = TrackBar2.Value
        PictureBox2.BackColor = Color.FromArgb(0, TrackBar2.Value, 0)
    End Sub

    Private Sub TrackBar3_Scroll(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TrackBar3.Scroll
        PictureBox4.BackColor = Color.FromArgb(TrackBar1.Value, TrackBar2.Value, TrackBar3.Value)
        Label3.Text = TrackBar3.Value
        PictureBox3.BackColor = Color.FromArgb(0, 0, TrackBar3.Value)
    End Sub
End Class

1 則留言: