'this is a script i used the other day, it randomizes the backcolor of the form
'code begins
Private Sub Command1_Click()
Text1.Text = Randomize("-1", "256")
Text2.Text = Randomize("-1", "256")
Text3.Text = Randomize("-1", "256")
Text4 = Text1 + Val(Text2) + Val(Text3)
Me.BackColor = Text4.Text
End Sub
Function Randomize(Lowerbound As Long, Upperbound As Long)
Randomize = Int(Rnd * Upperbound) + Lowerbound
End Function
Private Sub Form_Load()
Text1.Text = Randomize("-1", "256")
Text2.Text = Randomize("-1", "256")
Text3.Text = Randomize("-1", "256")
Text4 = Text1 + Val(Text2) + Val(Text3)
Me.BackColor = Text4.Text
End Sub
'code ends
'its a verry small code, so it shouldnt be tht hard
'right now it only cycles through the red colors, if you are able to get it to go any other colors please let me know, thnx
'if your using tht script try to keep the +val(text)'s in there
'im pretty sure it requires tht...
'it will keep comeing up with errors every 4 clicks and end your prog if you take out...
ME and a freind of mine have a vB class. We are using the schools outdated microsoft visual basic 2003. We in are spare time are trying to make a "Siezure" program. The point of this program is to simply have the user click a button and the background begin to flash Random colors. We could easily use a timer with a set of colors but we want to use random colors so they are unpredictable. We have tried multiple sets of code but can't seem to get anything to work. Could anyone tell me the code for making the background color of a forum flash with random colors?