VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This is an application for color gradient worked out by using horizontal scroll bar.It uses the con

by RAJARATHNAM.L (3 Submissions)
Category: Graphics
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Mon 19th April 2004
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This is an application for color gradient worked out by using horizontal scroll bar.It uses the concept of RGB whose value will be displayed

Rate This is an application for color gradient worked out by using horizontal scroll bar.It uses the con



Dim g As Integer
Dim b As Integer

Private Sub Command1_Click()
End
End Sub

Private Sub Command2_Click()
Form1.BackColor = Text1.BackColor
Text2.Text = HScroll1.Value
Text3.Text = HScroll1.Value
Text4.Text = HScroll1.Value
If r < 100 And g < 100 And b < 100 Then
MsgBox "Color Is Quite Dark !"
ElseIf r > g And r > b Then
MsgBox " Red Color Dominates More!"
ElseIf g > r And g > b Then
MsgBox "Green Color Dominates  "
ElseIf b > r And b > g Then
MsgBox "Blue Color Dominates"
End If

End Sub

Private Sub Command3_Click()
HScroll1.Value = Val(Text5.Text)
HScroll2.Value = Val(Text6.Text)
HScroll3.Value = Val(Text7.Text)

End Sub

Private Sub Form_Load()
Label6.Caption = Time
Label7.Caption = Format(Date, "dd/mm/yyyy")
End Sub

Private Sub HScroll1_Change()
r = HScroll1.Value
Text1.BackColor = RGB(r, g, b)
Text5.Text = HScroll1.Value
End Sub

Private Sub HScroll2_Change()
g = HScroll2.Value
Text1.BackColor = RGB(r, g, b)
Text6.Text = HScroll2.Value
End Sub

Private Sub HScroll3_Change()
b = HScroll3.Value
Text1.BackColor = RGB(r, g, b)
Text7.Text = HScroll3.Value
End Sub

Private Sub Text2_Change()
Text2.Text = HScroll1.Value
End Sub

Private Sub Text3_Change()
Text3.Text = HScroll2.Value
End Sub

Private Sub Text4_Change()
Text4.Text = HScroll3.Value
End Sub

Private Sub Timer1_Timer()
Label6.Caption = Time
End Sub


Download this snippet    Add to My Saved Code

This is an application for color gradient worked out by using horizontal scroll bar.It uses the con Comments

No comments have been posted about This is an application for color gradient worked out by using horizontal scroll bar.It uses the con. Why not be the first to post a comment about This is an application for color gradient worked out by using horizontal scroll bar.It uses the con.

Post your comment

Subject:
Message:
0/1000 characters