Color Changer sliders

  • Thread starter Slippery_1 via AccessMonster.com
  • Start date
S

Slippery_1 via AccessMonster.com

I found this "color changer" script
http://www.functionx.com/access/downloads.htm and modified it to work on one
of my forms. The intended user gets bored and likes to change things so....

How can I modify the script so that last color the person changed the form to
would update the Form_Load() line so that the next time the form opens that
would be the default background color?

***********************************************************
Private Sub Form_Load()
Rem Paint the frame with a default gray color
Detail.BackColor = RGB(255, 255, 192)
End Sub

Private Sub scrBlue_Change()
Detail.BackColor = RGB(255 - scrRed.Value, _
255 - scrGreen.Value, _
255 - scrBlue.Value)

lblBlue.Caption = 255 - scrBlue.Value
End Sub

Private Sub scrGreen_Change()
Detail.BackColor = RGB(255 - scrRed.Value, _
255 - scrGreen.Value, _
255 - scrBlue.Value)

lblGreen.Caption = 255 - scrGreen.Value
End Sub

Private Sub scrRed_Change()
' Create a color based on a combination of the values of the scroll bars
' Use that color to paint the frame
Detail.BackColor = RGB(255 - scrRed.Value, _
255 - scrGreen.Value, _
255 - scrBlue.Value)

' Show the value of red degree of the current color
lblRed.Caption = 255 - scrRed.Value
End Sub
***************************************************

TIA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top