运行开始
红色
绿色
蓝色
黑色
Public Class frmMain
Inherits System.Windows.Forms.Form
Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ShowColor()
End Sub
Private Sub ShowColor()
Dim intA, intR, intG, intB As Integer
intA = vsbA.Value
intR = hsbR.Value
intG = vsbG.Value
intB = hsbB.Value
picColor.BackColor = Color.FromArgb(intA, intR, intG, intB)
lblResult.Text = "A:" & " R:" & intR & "G:" & intG & " G:" & intG & " B:" & intB
End Sub
Private Sub hsbR_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles hsbR.Scroll
ShowColor()
End Sub
Private Sub hsbB_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles hsbB.Scroll
ShowColor()
End Sub
Private Sub vsbA_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles vsbA.Scroll
ShowColor()
End Sub
Private Sub vsbG_Scroll(ByVal sender As System.Object, ByVal e As System.Windows.Forms.ScrollEventArgs) Handles vsbG.Scroll
ShowColor()
End Sub
End Class