Monday, 4 April 2016

LAB 2:Write a Visual Basic Program to Change the color of the text using Scroll bar

qPrivate Sub Command1_Click()
Unload Me

End Sub

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


End Sub

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

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

No comments:

Post a Comment