Backcolor changed randomly with a RGB value

TenLarge

New member
Joined
Feb 15, 2006
Messages
2
Programming Experience
Beginner
i have a text box that i need the backcolor() changed randomly with a RGB value. VB6 was the best because this was incredebly easy but now all i can find is set colors, can some1 tell me how to change a textbox's back color VIA a RGB value using a button while the program is running? thanks
 
Did this just last night:
VB.NET:
textbox1.BackColor=system.Drawing.Color.FromArgb (RedValue, GreenValue, BlueValue)

-tg
 
yeah i've tried this this morning and for some reason its not working, giving me stuff like "statement expected" and stuff like that, i'd have to re-try at school (i dont have .net at home, just learning it in school after spending 2-3 years on VB6....doesnt help that my teacher is a tard and teaches what MSDN tells him to...)
 
Beats me... worked just fine for me... I had a form stuck a text box and a button on it. Put that code in the button click event... replacing the red/Green/BlueValues for real numbers.... hit the play button and clicked the button.. the textbox changed color like I expected....

-tg
 
Back
Top