Monday, June 14, 2010

SCROLL BAR APPLICATION

Buzz It
AIM:To create a form showing scrollbar properties


CODE

Form 1
Private Sub Form_Load()
redScroll.Min = 0
redScroll.Max = 255
redScroll.SmallChange = 1
redScroll.LargeChange = 25
redScroll.Value = 10
greenscroll.Min = 0
greenscroll.Max = 255
greenscroll.SmallChange = 1
greenscroll.LargeChange = 25
greenscroll.Value = 100
bluescroll.Min = 0
bluescroll.Max = 255
bluescroll.SmallChange = 1
bluescroll.LargeChange = 25
bluescroll.Value = 0
redlabel.BackColor = RGB(255, 0, 0)
greenlabel.BackColor = RGB(0, 255, 0)
bluelabel.BackColor = RGB(0, 0, 255)
scrolllabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
scrolllabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
changelabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
changelabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
End Sub
Private Sub greenscroll_Change()

changelabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
changelabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
scrolllabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
scrolllabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
End Sub
Private Sub greenscroll_Scroll()
scrolllabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
scrolllabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
End Sub
Private Sub redScroll_Change()
changelabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
changelabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
scrolllabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
scrolllabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
End Sub
Private Sub redScroll_Scroll()
scrolllabel.Caption = Chr(10) & Chr(10) & Chr(10) & "red=" &
redScroll.Value & Chr(10) & "green=" & greenscroll.Value & Chr(10) &
"blue=" & bluescroll.Value
scrolllabel.BackColor = RGB(redScroll.Value, greenscroll.Value,
bluescroll.Value)
End Sub



0 comments:

Post a Comment