- Home
·
- Graphics
·
- Now change backcolor using 3 horizontal scroll bars and the RGB function. This is all there is to i
Now change backcolor using 3 horizontal scroll bars and the RGB function. This is all there is to i
Now change backcolor using 3 horizontal scroll bars and the RGB function. This is all there is to it.
Rate Now change backcolor using 3 horizontal scroll bars and the RGB function. This is all there is to i
(1(1 Vote))
'Scroll bar properties(Make sure the min property is set to zero and max to 255).
Private Sub Form_Load()
'Initialize form backcolor to black because Scroll bars load on 0.
Me.BackColor = RGB(0, 0, 0)
End Sub
Private Sub hscBlue_Change()
'Call function to update with new value
slideColors
End Sub
Private Sub hscGreen_Change()
'Call function to update with new value
slideColors
End Sub
Private Sub hscRed_Change()
'Call function to update with new value
slideColors
End Sub
Private Function slideColors()
'Declare variables
Dim intRed As Integer
Dim intGreen As Integer
Dim intBlue As Integer
'Set variables = Scroll values
intRed = hscRed.Value
intGreen = hscGreen.Value
intBlue = hscBlue.Value
Me.BackColor = RGB(intRed, intGreen, intBlue)
'Optional labels to view the values of Scroll bars.
Label4.Caption = intRed
Label5.Caption = intGreen
Label6.Caption = intBlue
End Function
Now change backcolor using 3 horizontal scroll bars and the RGB function. This is all there is to i Comments
No comments yet — be the first to post one!
Post a Comment