i want to change the text color in textbox1 with scroll bar. if i moved the scroll bar the opacity of the font color should also change to dark is it possible if then please help
change text color in textbox with scroll bar
Page 1 of 12 Replies - 599 Views - Last Post: 30 January 2013 - 08:46 PM
Replies To: change text color in textbox with scroll bar
#2
Re: change text color in textbox with scroll bar
Posted 30 January 2013 - 02:07 AM
by using Hscrollbar contol you can do it. take 3 hscrollbar and a button, after scrolling all tree click button.
YOU CAN ALSO SET TEXT TO BOLD ...
Private Sub HScrollBar1_Scroll()
TEXTBOX1.ForeColor = Color.FromArgb(HScrollBar1.Value, HScrollBar2.Value, HScrollBar3.Value)
)
End Sub
' DO THE SAME FOR OTHER TWO SCROLLBAR ALSO.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
HScrollBar1_Scroll()
End Sub
YOU CAN ALSO SET TEXT TO BOLD ...
This post has been edited by kai_itz me: 30 January 2013 - 08:47 PM
#3
Re: change text color in textbox with scroll bar
Posted 30 January 2013 - 08:46 PM
The above code may not work in vb6 .. so try this
FOR VB6
FOR VB6
Private Sub Form_Load()
HScroll1.Value = 0
HScroll2.Value = 0
HScroll3.Value = 0
HScroll1.Max = 255
HScroll2.Max = 255
HScroll3.Max = 255
HScroll1.Min = 0
HScroll2.Min = 0
HScroll3.Min = 0
Textbox1.FontBold = True
End Sub
Private Sub HScroll1_Change()
Textbox1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub
Private Sub HScroll2_Change()
Textbox1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub
Private Sub HScroll3_Change()
Textbox1.ForeColor = RGB(HScroll1.Value, HScroll2.Value, HScroll3.Value)
End Sub
Page 1 of 1
|
|

New Topic/Question
Reply



MultiQuote




|