Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scroll bars & Shades of Color "RGB"

Status
Not open for further replies.

River25

Programmer
Mar 28, 2002
1
GB
I have used vb for about 140 hours now but i still can not figer out how to use scrollbars to munipulate RGB color scale to show the result in a textbox.
this may be simple but can any one help me i have use loops if...Else statements Do while and formed modles ect....
 
Enjoy !!!! [LOL]
[tt]
Private Sub Form_Load()
HScroll1.Max = 255
HScroll2.Max = 255
HScroll3.Max = 255
HScroll1.Min = 0
HScroll2.Min = 0
HScroll3.Min = 0
End Sub

Private Sub HScroll1_Change()
Text1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub

Private Sub HScroll2_Change()
Text1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub

Private Sub HScroll3_Change()
Text1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub
[/tt] Craig, mailto:sander@cogeco.ca

"Procrastination is the art of keeping up with yesterday."

I hope my post was helpful!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top