Monday, June 14, 2010

SLIDER CONTROL

Buzz It
AIM:To prepare a form for using slider control

CODE

Form 1
Private Sub Form_Load()
RED.Min = 0
RED.Max = 250
RED.SmallChange = 1
RED.LargeChange = 25
RED.TickFrequency = 25
RED.Value = 0
GREEN.Min = 0
GREEN.Max = 250
GREEN.SmallChange = 1
GREEN.LargeChange = 25
GREEN.TickFrequency = 25
GREEN.Value = 0
BLUE.Min = 0
BLUE.Max = 250
BLUE.SmallChange = 1
BLUE.LargeChange = 25
BLUE.TickFrequency = 25
BLUE.Value = 0
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub
Private Sub GREEN_Change()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub

Private Sub GREEN_Scroll()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub
Private Sub RED_Change()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub
Private Sub RED_Scroll()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub
Private Sub BLUE_Change()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub
Private Sub BLUE_Scroll()
colour.BackColor = RGB(RED.Value, GREEN.Value, BLUE.Value)
colour.Caption = Chr(10) & Chr(10) & "red=" & RED.Value & Chr(10) &
"green=" & GREEN.Value & Chr(10) & "blue=" & BLUE.Value
End Sub


0 comments:

Post a Comment