Computing.Net > Forums > Programming > Random colors in VB6 form

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Random colors in VB6 form

Reply to Message Icon

Name: gardenair
Date: June 7, 2004 at 14:47:57 Pacific
OS: win98
CPU/Ram: 166
Comment:

In VB6 i want to show random colors when my form will load.Please cany one write the complete code using Timer control. because Timer will be used for duartion to see the next color.
Thnaks



Sponsored Link
Ads by Google

Response Number 1
Name: StuartS
Date: June 7, 2004 at 15:58:57 Pacific
Reply:

RFM - its not hard.

Helping somebody with a problems is one thing, doing the whole damn job is something else. At least make an attempt at it and if you get stuck, post back.

Having somebody solve the problem for you will teach you nothing.

Stuart


0

Response Number 2
Name: secrets
Date: June 9, 2004 at 04:27:12 Pacific
Reply:

Stuart is right REM. next time try some thing and if got an error then post it here.

but top help you here is the code.

Dim di As Long
Private Sub Form_Load()
Timer1.Enabled = True
Timer1.Interval = 200
di = 8000000
End Sub

Private Sub Timer1_Timer()
Form1.BackColor = H & di
di = (di + 300)
End Sub


0

Response Number 3
Name: gardenair
Date: June 9, 2004 at 20:08:20 Pacific
Reply:

Thnaks Stuart for the help.The code is working fine. Can u please guide me for this line.

Form1.BackColor = H & di
di = (di + 300)

what H & di do ? here is the ambiguity

H & di
di = (di + 300)


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: Random colors in VB6 form

Need help in VB6 www.computing.net/answers/programming/need-help-in-vb6/8843.html

polygon shaped forms in vb6 www.computing.net/answers/programming/polygon-shaped-forms-in-vb6/7238.html

nasty fonts in VB6! www.computing.net/answers/programming/nasty-fonts-in-vb6/4645.html